AdamWathan\Form\Elements\FormOpen::action PHP Méthode

action() public méthode

public action ( $action )
    public function action($action)
    {
        $this->setAttribute('action', $action);
        return $this;
    }

Usage Example

Exemple #1
0
 public function testSetAction()
 {
     $form = new FormOpen();
     $expected = '<form method="POST" action="/test">';
     $result = $form->action('/test')->render();
     $this->assertEquals($expected, $result);
 }