original_string: public static function category_options($categories, $includenotset = true, $includeinherit = true) {
          $options = self::base_options($includenotset, $includeinherit);
          foreach ($categories as $category) {
              $options[$category->get('id')] = $category->get('name');
          }
  
          return $options;
      }
code: public static function category_options($categories, $includenotset = true, $includeinherit = true) {
          $options = self::base_options($includenotset, $includeinherit);
          foreach ($categories as $category) {
              $options[$category->get('id')] = $category->get('name');
          }
  
          return $options;
      }
code_tokens: public static function category_options ( $ categories , $ includenotset = true , $ includeinherit = true ) { $ options = self :: base_options ( $ includenotset , $ includeinherit ) ; foreach ( $ categories as $ category ) { $ options [ $ category -> get ( 'id' ) ] = $ category -> get ( 'name' ) ; } return $ options ; }
docstring: From a list of category persistents to a list of id => name categories.
  
  @param \tool_dataprivacy\category[] $categories
  @param bool $includenotset
  @param bool $includeinherit
  @return string[]
docstring_tokens: From a list of category persistents to a list of id = > name categories .