public function getTrailIds(NewsCategoryModel $category)
    {
        static $ids;

        if (!\is_array($ids)) {
            /** @var Database $db */
            $db = $this->framework->createInstance(Database::class);

            $ids = $db->getParentRecords($category->id, $category->getTable());
            $ids = \array_map('intval', \array_unique($ids));

            // Remove the current category
            unset($ids[\array_search($category->id, $ids, true)]);
        }

        return $ids;
    }
public function getTrailIds(NewsCategoryModel $category)
    {
        static $ids;

        if (!\is_array($ids)) {
            /** @var Database $db */
            $db = $this->framework->createInstance(Database::class);

            $ids = $db->getParentRecords($category->id, $category->getTable());
            $ids = \array_map('intval', \array_unique($ids));

            // Remove the current category
            unset($ids[\array_search($category->id, $ids, true)]);
        }

        return $ids;
    }
public function getTrailIds ( NewsCategoryModel $ category ) { static $ ids ; if ( ! \ is_array ( $ ids ) ) { /** @var Database $db */ $ db = $ this -> framework -> createInstance ( Database :: class ) ; $ ids = $ db -> getParentRecords ( $ category -> id , $ category -> getTable ( ) ) ; $ ids = \ array_map ( 'intval' , \ array_unique ( $ ids ) ) ; // Remove the current category unset ( $ ids [ \ array_search ( $ category -> id , $ ids , true ) ] ) ; } return $ ids ; }
Get the category trail IDs.

@param NewsCategoryModel $category

@return array
Get the category trail IDs .