@T~T~T~PT~T~T~HT~T~T~8T~T~ئT~ T~pT~T~T~HT~T~T~`T~T~T~hT~ЪT~ T~T~ȫT~ T~pT~ȬT~T~xT~ЭT~8T~T~T~PT~T~T~hT~T~(T~T~T~@T~T~T~`T~T~T~PT~T~T~`T~T~T~`T~T~T~`T~T~T~HT~T~T~@T~T~йT~T~`T~T~T~@T~T~ػT~(T~xT~ؼT~(T~T~нT~(T~hT~T~T~XT~T~T~HT~T~T~@T~T~T~ T~pT~T~ T~pT~T~T~pT~T~T~XT~T~T~`T~T~T~XT~T~T~hT~T~T~`T~T~ T~T~T~XT~T~(T~T~T~PT~T~T~xT~T~8T~T~T~@T~T~T~hT~T~(T~xT~T~(T~T~T~8T~T~T~@T~T~T~8T~xT~T~T~pT~T~T~XT~T~T~HT~T~T~0T~T~T~8T~T~T~HT~T~T~`T~T~T~`T~T~T~`T~T~T~@T~T~T~@T~T~T~8T~T~T~@T~T~T~0T~T~T~0T~T~T~(T~T~T~(T~pT~T~T~XT~T~T~XT~T~T~HT~T~T~(T~xT~T~T~PT~T~T~0T~pT~T~T~XT~T~T~@T~T~T~8T~xT~T~T~hT~T~T~PT~T~T~PT~T~T~(T~xT~T~T~XT~T~T~HT~T~T~s built right now * * @return array|string The segments of this item */ public function getWeblinkSegment($id, $query) { if (!strpos($id, ':')) { $id = (int) $id; $dbquery = $this->db->getQuery(true); $dbquery->select($this->db->quoteName('alias')) ->from($this->db->quoteName('#__weblinks')) ->where($this->db->quoteName('id') . ' = :id') ->bind(':id', $id, ParameterType::INTEGER); $this->db->setQuery($dbquery); $id .= ':' . $this->db->loadResult(); } if ($this->noIDs) { list($void, $segment) = explode(':', $id, 2); return array($void => $segment); } return array((int) $id => $id); } /** * Method to get the segment(s) for a form * * @param string $id ID of the weblink form to retrieve the segments for * @param array $query The request that is built right now * * @return array|string The segments of this item * * @since 4.0.0 */ public function getFormSegment($id, $query) { return $this->getWeblinkSegment($id, $query); } /** * Method to get the id for a category * * @param string $segment Segment to retrieve the ID for * @param array $query The request that is parsed right now * * @return mixed The id of this item or false */ public function getCategoryId($segment, $query) { if (isset($query['id'])) { $category = $this->getCategories(['access' => false])->get($query['id']); if ($category) { foreach ($category->getChildren() as $child) { if ($this->noIDs) { if ($child->alias == $segment) { return $child->id; } } else { if ($child->id == (int) $segment) { return $child->id; } } } } } return false; } /** * Method to get the segment(s) for a category * * @param string $segment Segment to retrieve the ID for * @param array $query The request that is parsed right now * * @return mixed The id of this item or false */ public function getCategoriesId($segment, $query) { return $this->getCategoryId($segment, $query); } /** * Method to get the segment(s) for a weblink * * @param string $segment Segment of the weblink to retrieve the ID for * @param array $query The request that is parsed right now * * @return mixed The id of this item or false */ public function getWeblinkId($segment, $query) { if ($this->noIDs) { $dbquery = $this->db->getQuery(true); $dbquery->select($this->db->quoteName('id')) ->from($this->db->quoteName('#__weblinks')) ->where( [ $this->db->quoteName('alias') . ' = :alias', $this->db->quoteName('catid') . ' = :catid', ] ) ->bind(':alias', $segment) ->bind(':catid', $query['id'], ParameterType::INTEGER); $this->db->setQuery($dbquery); return (int) $this->db->loadResult(); } return (int) $segment; } /** * Method to get categories from cache * * @param array $options The options for retrieving categories * * @return CategoryInterface The object containing categories * * @since 4.0.0 */ private function getCategories(array $options = []): CategoryInterface { $key = serialize($options); if (!isset($this->categoryCache[$key])) { $this->categoryCache[$key] = $this->categoryFactory->createCategory($options); } return $this->categoryCache[$key]; } }
© Ufolep - CNS Sports Aériens & Modélisme CLAP - 2023/2024
Catégorie: Inscriptions_aux_criteriums