コード例 #1
0
ファイル: Form.php プロジェクト: mystlabs/mistyforms
 /**
  * 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();
 }
コード例 #2
0
ファイル: Button.php プロジェクト: mystlabs/mistyforms
 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;
 }
コード例 #3
0
ファイル: Submit.php プロジェクト: mystlabs/mistyforms
 public function __construct(array $attributes)
 {
     parent::__construct($attributes);
     $this->value = $this->requiredAttribute('value');
 }