/** * Checks whether we can index this page. * * @param Item $item The page we want to index encapsulated in an index queue item * @return boolean True if we can index this page, FALSE otherwise */ protected function isPageIndexable(Item $item) { // TODO do we still need this? // shouldn't those be sorted out by the record monitor / garbage collector already? $isIndexable = true; $record = $item->getRecord(); if (isset($GLOBALS['TCA']['pages']['ctrl']['enablecolumns']['disabled']) && $record[$GLOBALS['TCA']['pages']['ctrl']['enablecolumns']['disabled']]) { $isIndexable = false; } return $isIndexable; }
/** * Generates an Access Rootline for an item. * * @param Item $item Index Queue item to index. * @return string The Access Rootline for the item */ protected function getAccessRootline(Item $item) { $accessRestriction = '0'; $itemRecord = $item->getRecord(); // TODO support access restrictions set on storage page if (isset($GLOBALS['TCA'][$item->getType()]['ctrl']['enablecolumns']['fe_group'])) { $accessRestriction = $itemRecord[$GLOBALS['TCA'][$item->getType()]['ctrl']['enablecolumns']['fe_group']]; if (empty($accessRestriction)) { // public $accessRestriction = '0'; } } return 'r:' . $accessRestriction; }