public function &createAction(string $type, string $text, string $href = '', bool $ajax = false, string $confirm = ''): Action
    {
        $action = new Action();

        $action->setType($type);
        $action->setText($text);

        if (!empty($href)) {
            $action->setHref($href);
        }

        $action->setAjax($ajax);

        if (!empty($confirm)) {
            $action->setConfirm('confirm');
        }

        $this->addAction($action);

        return $action;
    }
public function &createAction(string $type, string $text, string $href = '', bool $ajax = false, string $confirm = ''): Action
    {
        $action = new Action();

        $action->setType($type);
        $action->setText($text);

        if (!empty($href)) {
            $action->setHref($href);
        }

        $action->setAjax($ajax);

        if (!empty($confirm)) {
            $action->setConfirm('confirm');
        }

        $this->addAction($action);

        return $action;
    }
public function & createAction ( string $ type , string $ text , string $ href = '' , bool $ ajax = false , string $ confirm = '' ) : Action { $ action = new Action ( ) ; $ action -> setType ( $ type ) ; $ action -> setText ( $ text ) ; if ( ! empty ( $ href ) ) { $ action -> setHref ( $ href ) ; } $ action -> setAjax ( $ ajax ) ; if ( ! empty ( $ confirm ) ) { $ action -> setConfirm ( 'confirm' ) ; } $ this -> addAction ( $ action ) ; return $ action ; }
Creates an action object, adds it to the actionslist and returns a reference to it

@param string $type
@param string $text
@param string $href
@param string $ajax
@param string $confirm

@return Action
Creates an action object adds it to the actionslist and returns a reference to it