public function add($action) {
        if ($action instanceof action_link) {
            if ($action->primary) {
                $this->add_primary_action($action);
            } else {
                $this->add_secondary_action($action);
            }
        } else if ($action instanceof pix_icon) {
            $this->add_primary_action($action);
        } else {
            $this->add_secondary_action($action);
        }
    }
public function add($action) {
        if ($action instanceof action_link) {
            if ($action->primary) {
                $this->add_primary_action($action);
            } else {
                $this->add_secondary_action($action);
            }
        } else if ($action instanceof pix_icon) {
            $this->add_primary_action($action);
        } else {
            $this->add_secondary_action($action);
        }
    }
public function add ( $ action ) { if ( $ action instanceof action_link ) { if ( $ action -> primary ) { $ this -> add_primary_action ( $ action ) ; } else { $ this -> add_secondary_action ( $ action ) ; } } else if ( $ action instanceof pix_icon ) { $ this -> add_primary_action ( $ action ) ; } else { $ this -> add_secondary_action ( $ action ) ; } }
Adds an action to this action menu.

@param action_menu_link|pix_icon|string $action
Adds an action to this action menu .