public function getParents() { if (count($this->parents)) { return $this->wire('pages')->getById($this->parents, array('autojoin' => false)); } else { return parent::getParents(); } }
public function __get($key) { if ($key == 'tabs') { return $this->wire('modules')->get('LanguageSupport')->getLanguageTabs(); } if ($key == 'default') { return $this->getDefault(); } if ($key == 'support') { return $this->wire('modules')->get('LanguageSupport'); } return parent::__get($key); }
/** * Construct this Languages PagesType * */ public function __construct(Template $template, $parent_id) { parent::__construct($template, $parent_id); }
/** * Like find() but returns only the first match as a Page object (not PageArray) * * This is an alias of the findOne() method for syntactic convenience and consistency. * * @param string $selectorString * @return Page|null */ public function get($selectorString) { $user = parent::get($selectorString); return $user; }
public function ___deleted(Page $page) { $this->wire('cache')->delete(self::cacheName); parent::___deleted($page); }