src/WasabiLib/View/Button.php
public function setAction($action) {
        $this->setVariable(self::ACTION, $this->assembleAssignmentString(self::DATA_HREF, $action));
        $this->setEventType(self::CLICK_EVENT);
        $this->addClass(self::AJAX_ELEMENT_CLASS);
        if(!$this->getId()) {
            $this->setId("button_".floor(rand(0, 1000)));
        }
    }
public function setAction($action) {
        $this->setVariable(self::ACTION, $this->assembleAssignmentString(self::DATA_HREF, $action));
        $this->setEventType(self::CLICK_EVENT);
        $this->addClass(self::AJAX_ELEMENT_CLASS);
        if(!$this->getId()) {
            $this->setId("button_".floor(rand(0, 1000)));
        }
    }
public function setAction ( $ action ) { $ this -> setVariable ( self :: ACTION , $ this -> assembleAssignmentString ( self :: DATA_HREF , $ action ) ) ; $ this -> setEventType ( self :: CLICK_EVENT ) ; $ this -> addClass ( self :: AJAX_ELEMENT_CLASS ) ; if ( ! $ this -> getId ( ) ) { $ this -> setId ( "button_" . floor ( rand ( 0 , 1000 ) ) ) ; } }
Sets the route to a controller action.
@param string $action
Sets the route to a controller action .