public function getCatalogItem($name)
    {
        if (!($this->getFiller() instanceof FillerInterface)) {
            return;
        }

        try {
            $list = $this->search(['name' => $name]);
            if (count($list) == 1) {
                return $this->getFiller()->fillFromSearchResult(array_pop($list));
            }
        } catch (\Exception $e) {
        } // is not a critical error

        return;
    }
public function getCatalogItem($name)
    {
        if (!($this->getFiller() instanceof FillerInterface)) {
            return;
        }

        try {
            $list = $this->search(['name' => $name]);
            if (count($list) == 1) {
                return $this->getFiller()->fillFromSearchResult(array_pop($list));
            }
        } catch (\Exception $e) {
        } // is not a critical error

        return;
    }
public function getCatalogItem ( $ name ) { if ( ! ( $ this -> getFiller ( ) instanceof FillerInterface ) ) { return ; } try { $ list = $ this -> search ( [ 'name' => $ name ] ) ; if ( count ( $ list ) == 1 ) { return $ this -> getFiller ( ) -> fillFromSearchResult ( array_pop ( $ list ) ) ; } } catch ( \ Exception $ e ) { } // is not a critical error return ; }
Try search item by name and fill it if can.

@param string $name

@return EntityItem|null
Try search item by name and fill it if can .