public function getTitle($lang = null) { if (empty($lang)) { $lang = Property::getDefaultLanguage(); } $model = $this->getBlockLang($lang); return !is_null($model) ? $model->title : null; }
public function getParentName($lang = null) { $parent = !empty($this->parent) ? Category::findOne($this->parent) : null; if (!is_null($parent)) { if (empty($lang)) { $lang = Property::getDefaultLanguage(); } $model = $parent->getCategoryLang($lang); return !is_null($model) ? $model->name : null; } return null; }
public function getInformation($lang = null) { if (empty($lang)) { $lang = Property::getDefaultLanguage(); } $model = $this->getProductLang($lang); return !is_null($model) ? $model->information : null; }