public function add_action(moodle_url $url, $label, $method = 'get') {

        $action = new stdClass();
        $action->url = $url;
        $action->label = $label;
        $action->method = $method;

        $this->actions[] = $action;
    }
public function add_action(moodle_url $url, $label, $method = 'get') {

        $action = new stdClass();
        $action->url = $url;
        $action->label = $label;
        $action->method = $method;

        $this->actions[] = $action;
    }
public function add_action ( moodle_url $ url , $ label , $ method = 'get' ) { $ action = new stdClass ( ) ; $ action -> url = $ url ; $ action -> label = $ label ; $ action -> method = $ method ; $ this -> actions [ ] = $ action ; }
Adds a new action

@param moodle_url $url action URL
@param string $label action label
@param string $method get|post
Adds a new action