Pimcore\Model\Tool\Tag\Config::getByName PHP Method

getByName() public static method

public static getByName ( $name ) : Config
$name
return Config
    public static function getByName($name)
    {
        try {
            $tag = new self();
            $tag->getDao()->getByName($name);
        } catch (\Exception $e) {
            return null;
        }
        return $tag;
    }

Usage Example

Example #1
0
 /**
  * @return array
  */
 public function load()
 {
     $properties = [];
     $propertiesData = $this->db->fetchAll($this->model->getFilter(), $this->model->getOrder());
     foreach ($propertiesData as $propertyData) {
         $properties[] = Config::getByName($propertyData["id"]);
     }
     $this->model->setTags($properties);
     return $properties;
 }
All Usage Examples Of Pimcore\Model\Tool\Tag\Config::getByName