/** * Add a category to the exporing list * * @param Category $category The category to export * * @return AppExporterZoo2 $this for chaining support * * @since 2.0 */ protected function _addZooCategory(Category $category) { // store category attributes $data = array(); foreach ($this->category_attributes as $attribute) { if (isset($category->{$attribute})) { $data[$attribute] = $category->{$attribute}; } } // store category parent if (isset($this->_categories[$category->parent])) { $data['parent'] = $this->_categories[$category->parent]->alias; } // store category content params $data['content'] = $category->alias == '_root' ? $this->_application->getParams()->get('content.') : $category->getParams()->get('content.'); // store category metadata params $data['metadata'] = $category->alias == '_root' ? $this->_application->getParams()->get('metadata.') : $category->getParams()->get('metadata.'); parent::_addCategory($category->name, $category->alias, $data); }