Algolia_Algoliasearch_Helper_Entity_Categoryhelper::getAllAttributes PHP Метод

getAllAttributes() публичный Метод

public getAllAttributes ( )
    public function getAllAttributes()
    {
        if (is_null(self::$_categoryAttributes)) {
            self::$_categoryAttributes = array();
            /** @var $config Mage_Eav_Model_Config */
            $config = Mage::getSingleton('eav/config');
            $allAttributes = $config->getEntityAttributeCodes('catalog_category');
            $categoryAttributes = array_merge($allAttributes, array('product_count'));
            $excludedAttributes = array('all_children', 'available_sort_by', 'children', 'children_count', 'custom_apply_to_products', 'custom_design', 'custom_design_from', 'custom_design_to', 'custom_layout_update', 'custom_use_parent_settings', 'default_sort_by', 'display_mode', 'filter_price_range', 'global_position', 'image', 'include_in_menu', 'is_active', 'is_always_include_in_menu', 'is_anchor', 'landing_page', 'level', 'lower_cms_block', 'page_layout', 'path_in_store', 'position', 'small_image', 'thumbnail', 'url_key', 'url_path', 'visible_in_menu');
            $categoryAttributes = array_diff($categoryAttributes, $excludedAttributes);
            foreach ($categoryAttributes as $attributeCode) {
                self::$_categoryAttributes[$attributeCode] = $config->getAttribute('catalog_category', $attributeCode)->getFrontendLabel();
            }
        }
        return self::$_categoryAttributes;
    }