Example #1
0
 /**
  * @return void
  */
 function prepare()
 {
     if (!$this->hasAttribute('name')) {
         if ($this->hasConstantAttribute('id')) {
             $this->setAttribute('name', $this->getAttribute('id'));
         } elseif ($this->hasAttribute('wact:id')) {
             $this->setAttribute('name', $this->getAttribute('wact:id'));
         } else {
             $this->raiseRequiredAttributeError('name');
         }
     }
     parent::prepare();
 }