/** * Set the friendly URL archive by forcing it into the URI. * @return bool|string */ public function setArchiveUri() { if (!$this->parentResource) { $this->parentResource = $this->object->getOne('Parent'); if (!$this->parentResource) { return false; } } return $this->object->setArchiveUri(); }
public function actionOne() { $id = $_GET['id']; $items = Article::getOne($id); include __DIR__ . '/../view/articles/one.php'; }
protected function getArticle($brand, $number) { require_once __DIR__ . '/../lib.php'; $article = \Article::getOne($brand, $number, $this->collectionArticle, ['brand', 'number', 'images']); if (!$article && $this->isGetArticleByAltNumber) { $article = \Article::getByAltNumber($brand, $number, $this->collectionArticle, ['brand', 'number', 'images']); } //Поиск по ean if (!$article && $this->isGetArticleByEan) { $article = \Article::getByEan($brand, $number, $this->collectionArticle, ['brand', 'number', 'images']); } return $article; }