protected function getCategoryIdFromMetadata(array $attr)
    {

        // load the metadata of the passed URL rewrite entity
        $metadata = $this->getMetadata($attr);

        // return the category ID from the metadata
        return (integer) $metadata[UrlRewriteObserver::CATEGORY_ID];
    }
protected function getCategoryIdFromMetadata(array $attr)
    {

        // load the metadata of the passed URL rewrite entity
        $metadata = $this->getMetadata($attr);

        // return the category ID from the metadata
        return (integer) $metadata[UrlRewriteObserver::CATEGORY_ID];
    }
protected function getCategoryIdFromMetadata ( array $ attr ) { // load the metadata of the passed URL rewrite entity $ metadata = $ this -> getMetadata ( $ attr ) ; // return the category ID from the metadata return ( integer ) $ metadata [ UrlRewriteObserver :: CATEGORY_ID ] ; }
Extracts the category ID of the passed URL rewrite entity, if available, and return's it.

@param array $attr The URL rewrite entity to extract and return the category ID for

@return integer|null The category ID if available, else NULL
Extracts the category ID of the passed URL rewrite entity if available and return s it .