public function get_primary_actions(core_renderer $output = null) {
        global $OUTPUT;
        if ($output === null) {
            $output = $OUTPUT;
        }
        $pixicon = $this->actionicon;
        $linkclasses = array('toggle-display');

        $title = '';
        if (!empty($this->menutrigger)) {
            $pixicon = '<b class="caret"></b>';
            $linkclasses[] = 'textmenu';
        } else {
            $title = new lang_string('actionsmenu', 'moodle');
            $this->actionicon = new pix_icon(
                't/edit_menu',
                '',
                'moodle',
                array('class' => 'iconsmall actionmenu', 'title' => '')
            );
            $pixicon = $this->actionicon;
        }
        if ($pixicon instanceof renderable) {
            $pixicon = $output->render($pixicon);
            if ($pixicon instanceof pix_icon && isset($pixicon->attributes['alt'])) {
                $title = $pixicon->attributes['alt'];
            }
        }
        $string = '';
        if ($this->actiontext) {
            $string = $this->actiontext;
        }
        $label = '';
        if ($this->actionlabel) {
            $label = $this->actionlabel;
        } else {
            $label = $title;
        }
        $actions = $this->primaryactions;
        $attributes = array(
            'class' => implode(' ', $linkclasses),
            'title' => $title,
            'aria-label' => $label,
            'id' => 'action-menu-toggle-'.$this->instance,
            'role' => 'menuitem'
        );
        $link = html_writer::link('#', $string . $this->menutrigger . $pixicon, $attributes);
        if ($this->prioritise) {
            array_unshift($actions, $link);
        } else {
            $actions[] = $link;
        }
        return $actions;
    }
public function get_primary_actions(core_renderer $output = null) {
        global $OUTPUT;
        if ($output === null) {
            $output = $OUTPUT;
        }
        $pixicon = $this->actionicon;
        $linkclasses = array('toggle-display');

        $title = '';
        if (!empty($this->menutrigger)) {
            $pixicon = '<b class="caret"></b>';
            $linkclasses[] = 'textmenu';
        } else {
            $title = new lang_string('actionsmenu', 'moodle');
            $this->actionicon = new pix_icon(
                't/edit_menu',
                '',
                'moodle',
                array('class' => 'iconsmall actionmenu', 'title' => '')
            );
            $pixicon = $this->actionicon;
        }
        if ($pixicon instanceof renderable) {
            $pixicon = $output->render($pixicon);
            if ($pixicon instanceof pix_icon && isset($pixicon->attributes['alt'])) {
                $title = $pixicon->attributes['alt'];
            }
        }
        $string = '';
        if ($this->actiontext) {
            $string = $this->actiontext;
        }
        $label = '';
        if ($this->actionlabel) {
            $label = $this->actionlabel;
        } else {
            $label = $title;
        }
        $actions = $this->primaryactions;
        $attributes = array(
            'class' => implode(' ', $linkclasses),
            'title' => $title,
            'aria-label' => $label,
            'id' => 'action-menu-toggle-'.$this->instance,
            'role' => 'menuitem'
        );
        $link = html_writer::link('#', $string . $this->menutrigger . $pixicon, $attributes);
        if ($this->prioritise) {
            array_unshift($actions, $link);
        } else {
            $actions[] = $link;
        }
        return $actions;
    }
public function get_primary_actions ( core_renderer $ output = null ) { global $ OUTPUT ; if ( $ output === null ) { $ output = $ OUTPUT ; } $ pixicon = $ this -> actionicon ; $ linkclasses = array ( 'toggle-display' ) ; $ title = '' ; if ( ! empty ( $ this -> menutrigger ) ) { $ pixicon = '<b class="caret"></b>' ; $ linkclasses [ ] = 'textmenu' ; } else { $ title = new lang_string ( 'actionsmenu' , 'moodle' ) ; $ this -> actionicon = new pix_icon ( 't/edit_menu' , '' , 'moodle' , array ( 'class' => 'iconsmall actionmenu' , 'title' => '' ) ) ; $ pixicon = $ this -> actionicon ; } if ( $ pixicon instanceof renderable ) { $ pixicon = $ output -> render ( $ pixicon ) ; if ( $ pixicon instanceof pix_icon && isset ( $ pixicon -> attributes [ 'alt' ] ) ) { $ title = $ pixicon -> attributes [ 'alt' ] ; } } $ string = '' ; if ( $ this -> actiontext ) { $ string = $ this -> actiontext ; } $ label = '' ; if ( $ this -> actionlabel ) { $ label = $ this -> actionlabel ; } else { $ label = $ title ; } $ actions = $ this -> primaryactions ; $ attributes = array ( 'class' => implode ( ' ' , $ linkclasses ) , 'title' => $ title , 'aria-label' => $ label , 'id' => 'action-menu-toggle-' . $ this -> instance , 'role' => 'menuitem' ) ; $ link = html_writer :: link ( '#' , $ string . $ this -> menutrigger . $ pixicon , $ attributes ) ; if ( $ this -> prioritise ) { array_unshift ( $ actions , $ link ) ; } else { $ actions [ ] = $ link ; } return $ actions ; }
Returns the primary actions ready to be rendered.

@param core_renderer $output The renderer to use for getting icons.
@return array
Returns the primary actions ready to be rendered .