SimpleForm::getAction PHP Метод

getAction() публичный Метод

Absolute URL of the target.
public getAction ( ) : SimpleUrl
Результат SimpleUrl URL target.
    public function getAction()
    {
        $url = $this->action;
        if ($this->default_target && !$url->getTarget()) {
            $url->setTarget($this->default_target);
        }
        if ($this->getMethod() === 'get') {
            $url->clearRequest();
        }
        return $url;
    }

Usage Example

Пример #1
0
 function testDefaultFrameTargetOnForm()
 {
     $tag = new SimpleFormTag(array('method' => 'GET', 'action' => 'here.php', 'id' => '33'));
     $form = new SimpleForm($tag, new SimpleUrl('http://host/a/index.html'));
     $form->setDefaultTarget('frame');
     $expected = new SimpleUrl('http://host/a/here.php');
     $expected->setTarget('frame');
     $this->assertEqual($form->getAction(), $expected);
 }
All Usage Examples Of SimpleForm::getAction