original_string: public function category_listitem_actions(core_course_category $category, array $actions = null) {
          if ($actions === null) {
              $actions = \core_course\management\helper::get_category_listitem_actions($category);
          }
          $menu = new action_menu();
          $menu->attributes['class'] .= ' category-item-actions item-actions';
          $hasitems = false;
          foreach ($actions as $key => $action) {
              $hasitems = true;
              $menu->add(new action_menu_link(
                  $action['url'],
                  $action['icon'],
                  $action['string'],
                  in_array($key, array('show', 'hide', 'moveup', 'movedown')),
                  array('data-action' => $key, 'class' => 'action-'.$key)
              ));
          }
          if (!$hasitems) {
              return '';
          }
          return $this->render($menu);
      }
code: public function category_listitem_actions(core_course_category $category, array $actions = null) {
          if ($actions === null) {
              $actions = \core_course\management\helper::get_category_listitem_actions($category);
          }
          $menu = new action_menu();
          $menu->attributes['class'] .= ' category-item-actions item-actions';
          $hasitems = false;
          foreach ($actions as $key => $action) {
              $hasitems = true;
              $menu->add(new action_menu_link(
                  $action['url'],
                  $action['icon'],
                  $action['string'],
                  in_array($key, array('show', 'hide', 'moveup', 'movedown')),
                  array('data-action' => $key, 'class' => 'action-'.$key)
              ));
          }
          if (!$hasitems) {
              return '';
          }
          return $this->render($menu);
      }
code_tokens: public function category_listitem_actions ( core_course_category $ category , array $ actions = null ) { if ( $ actions === null ) { $ actions = \ core_course \ management \ helper :: get_category_listitem_actions ( $ category ) ; } $ menu = new action_menu ( ) ; $ menu -> attributes [ 'class' ] .= ' category-item-actions item-actions' ; $ hasitems = false ; foreach ( $ actions as $ key => $ action ) { $ hasitems = true ; $ menu -> add ( new action_menu_link ( $ action [ 'url' ] , $ action [ 'icon' ] , $ action [ 'string' ] , in_array ( $ key , array ( 'show' , 'hide' , 'moveup' , 'movedown' ) ) , array ( 'data-action' => $ key , 'class' => 'action-' . $ key ) ) ) ; } if ( ! $ hasitems ) { return '' ; } return $ this -> render ( $ menu ) ; }
docstring: Renderers the actions for individual category list items.
  
  @param core_course_category $category
  @param array $actions
  @return string
docstring_tokens: Renderers the actions for individual category list items .