original_string: public static function get_definition_actions(context $context, array $definition) {
          if (has_capability('moodle/site:config', $context)) {
              $actions = array();
              // Edit mappings.
              $actions[] = array(
                  'text' => get_string('editmappings', 'cache'),
                  'url' => new moodle_url('/cache/admin.php', array('action' => 'editdefinitionmapping', 'sesskey' => sesskey()))
              );
              // Edit sharing.
              if (count($definition['sharingoptions']) > 1) {
                  $actions[] = array(
                      'text' => get_string('editsharing', 'cache'),
                      'url' => new moodle_url('/cache/admin.php', array('action' => 'editdefinitionsharing', 'sesskey' => sesskey()))
                  );
              }
              // Purge.
              $actions[] = array(
                  'text' => get_string('purge', 'cache'),
                  'url' => new moodle_url('/cache/admin.php', array('action' => 'purgedefinition', 'sesskey' => sesskey()))
              );
              return $actions;
          }
          return array();
      }
code: public static function get_definition_actions(context $context, array $definition) {
          if (has_capability('moodle/site:config', $context)) {
              $actions = array();
              // Edit mappings.
              $actions[] = array(
                  'text' => get_string('editmappings', 'cache'),
                  'url' => new moodle_url('/cache/admin.php', array('action' => 'editdefinitionmapping', 'sesskey' => sesskey()))
              );
              // Edit sharing.
              if (count($definition['sharingoptions']) > 1) {
                  $actions[] = array(
                      'text' => get_string('editsharing', 'cache'),
                      'url' => new moodle_url('/cache/admin.php', array('action' => 'editdefinitionsharing', 'sesskey' => sesskey()))
                  );
              }
              // Purge.
              $actions[] = array(
                  'text' => get_string('purge', 'cache'),
                  'url' => new moodle_url('/cache/admin.php', array('action' => 'purgedefinition', 'sesskey' => sesskey()))
              );
              return $actions;
          }
          return array();
      }
code_tokens: public static function get_definition_actions ( context $ context , array $ definition ) { if ( has_capability ( 'moodle/site:config' , $ context ) ) { $ actions = array ( ) ; // Edit mappings. $ actions [ ] = array ( 'text' => get_string ( 'editmappings' , 'cache' ) , 'url' => new moodle_url ( '/cache/admin.php' , array ( 'action' => 'editdefinitionmapping' , 'sesskey' => sesskey ( ) ) ) ) ; // Edit sharing. if ( count ( $ definition [ 'sharingoptions' ] ) > 1 ) { $ actions [ ] = array ( 'text' => get_string ( 'editsharing' , 'cache' ) , 'url' => new moodle_url ( '/cache/admin.php' , array ( 'action' => 'editdefinitionsharing' , 'sesskey' => sesskey ( ) ) ) ) ; } // Purge. $ actions [ ] = array ( 'text' => get_string ( 'purge' , 'cache' ) , 'url' => new moodle_url ( '/cache/admin.php' , array ( 'action' => 'purgedefinition' , 'sesskey' => sesskey ( ) ) ) ) ; return $ actions ; } return array ( ) ; }
docstring: Returns all of the actions that can be performed on a definition.
  @param context $context
  @return array
docstring_tokens: Returns all of the actions that can be performed on a definition .