Beispiel #1
0
 /**
  * Register a new Action with this form, renders it and return the HTML code
  */
 public function registerAndRenderAction(Action $action)
 {
     $this->ensureIdIsUnique($action->id);
     $this->ensureHandlerHasAction($action->id);
     $this->actions[$action->id] = $action;
     return $action->render();
 }
Beispiel #2
0
 public function __construct(array $attributes, $content)
 {
     parent::__construct($attributes);
     if (!$content) {
         throw new ConfigurationException(sprintf('Missing content for Button: %s', $this->id));
     }
     $this->content = $content;
 }
Beispiel #3
0
 public function __construct(array $attributes)
 {
     parent::__construct($attributes);
     $this->value = $this->requiredAttribute('value');
 }