protected function prepareMetadata(array $category)
    {

        // initialize the metadata
        $metadata = array();

        // query whether or not, the passed category IS the root category
        if ($this->isRootCategory($category)) {
            return;
        }

        // if not, set the category ID in the metadata
        $metadata[UrlRewriteObserver::CATEGORY_ID] = (integer) $category[MemberNames::ENTITY_ID];

        // return the metadata
        return $metadata;
    }
protected function prepareMetadata(array $category)
    {

        // initialize the metadata
        $metadata = array();

        // query whether or not, the passed category IS the root category
        if ($this->isRootCategory($category)) {
            return;
        }

        // if not, set the category ID in the metadata
        $metadata[UrlRewriteObserver::CATEGORY_ID] = (integer) $category[MemberNames::ENTITY_ID];

        // return the metadata
        return $metadata;
    }
protected function prepareMetadata ( array $ category ) { // initialize the metadata $ metadata = array ( ) ; // query whether or not, the passed category IS the root category if ( $ this -> isRootCategory ( $ category ) ) { return ; } // if not, set the category ID in the metadata $ metadata [ UrlRewriteObserver :: CATEGORY_ID ] = ( integer ) $ category [ MemberNames :: ENTITY_ID ] ; // return the metadata return $ metadata ; }
Prepare's the URL rewrite's metadata with the passed category values.

@param array $category The category used for preparation

@return array|null The metadata
Prepare s the URL rewrite s metadata with the passed category values .