Example #1
0
 /**
  * @return Collection
  */
 public function getAllAttributes()
 {
     $all = new Collection();
     foreach ($this->attributes as $attr) {
         $all->put($attr->name, $attr);
     }
     foreach ($this->sections->all() as $section) {
         foreach ($section->getAttributes() as $attr) {
             $all->put($attr->name, $attr);
         }
     }
     foreach ($this->tabs->all() as $tab) {
         foreach ($tab->getAttributes() as $attr) {
             $all->put($attr->name, $attr);
         }
         foreach ($tab->getSections() as $section) {
             foreach ($section as $attr) {
                 $all->put($attr->name, $attr);
             }
         }
     }
     return $all;
 }