Вход Регистрация
Файл: concrete5.7.5.6/concrete/src/Page/Search/Result/Item.php
Строк: 54
<?php
namespace ConcreteCorePageSearchResult;

use 
ConcreteCoreSearchResultItem as SearchResultItem;
use 
ConcreteCoreSearchResultItemColumn as SearchResultItemColumn;
use 
ConcreteCoreSearchResultResult as SearchResult;
use 
ConcreteCoreSearchColumnSet;
use 
Permissions;

class 
Item extends SearchResultItem {

    public 
$cID;

    public function 
__construct(SearchResult $resultSet $columns$item) {
        
$list $result->getItemListObject();
        if (
$list->isFulltextSearch()) {
            
$this->columns[] = new SearchResultItemColumn(t('Score'), $item->getPageIndexScore());
        }
        
parent::__construct($result$columns$item);
        
$this->populateDetails($item);
    }

    protected function 
populateDetails($item) {
        
$this->cID $item->getCollectionID();
        
$this->link $item->getCollectionLink();
        
$cp = new Permissions($item);
        
$this->canEditPageProperties $cp->canEditPageProperties();
        
$this->canEditPageSpeedSettings $cp->canEditPageSpeedSettings();
        
$this->canEditPagePermissions $cp->canEditPagePermissions();
        
$this->canEditPageDesign $cp->canEditPageTemplate() || $cp->canEditPageTheme();
        
$this->canEditPageType $cp->canEditPageType();
        
$this->canViewPageVersions $cp->canViewPageVersions();
        
$this->canDeletePage $cp->canDeletePage();
        
$this->cvName $item->getCollectionName();
    }


}
Онлайн: 1
Реклама