public function add_primary_action($action) {
        if ($action instanceof action_link || $action instanceof pix_icon) {
            $action->attributes['role'] = 'menuitem';
            if ($action instanceof action_menu_link) {
                $action->actionmenu = $this;
            }
        }
        $this->primaryactions[] = $action;
    }
public function add_primary_action($action) {
        if ($action instanceof action_link || $action instanceof pix_icon) {
            $action->attributes['role'] = 'menuitem';
            if ($action instanceof action_menu_link) {
                $action->actionmenu = $this;
            }
        }
        $this->primaryactions[] = $action;
    }
public function add_primary_action ( $ action ) { if ( $ action instanceof action_link || $ action instanceof pix_icon ) { $ action -> attributes [ 'role' ] = 'menuitem' ; if ( $ action instanceof action_menu_link ) { $ action -> actionmenu = $ this ; } } $ this -> primaryactions [ ] = $ action ; }
Adds a primary action to the action menu.

@param action_menu_link|action_link|pix_icon|string $action
Adds a primary action to the action menu .