Newscoop\Entity\Snippet\SnippetTemplate::getEnabled PHP Метод

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

Getter for enabled
public getEnabled ( ) : mixed
Результат mixed
    public function getEnabled()
    {
        return $this->enabled;
    }

Usage Example

Пример #1
0
 /**
  * Constructs the Snippet
  *
  * @param SnippetTemplate $template SnippetTemplate to set for this Snippet
  */
 public function __construct(SnippetTemplate $template)
 {
     if (!$template->hasFields()) {
         throw new \Exception('SnippetTemplate should have fields');
     }
     if (!$template->getEnabled()) {
         throw new \Exception('SnippetTemplate should be enabled');
     }
     $this->fields = new ArrayCollection();
     $this->articles = new ArrayCollection();
     $this->setTemplate($template);
     $this->setCreated();
 }