original_string: public function isValidExtension($extension)
      {
          $valid_page_types = implode('|', Grav::instance()['config']->get('system.pages.types'));
  
          // Strip the file extension for valid page types
          if (preg_match('/(' . $valid_page_types . ')/', $extension)) {
              return true;
          }
          return false;
      }
code: public function isValidExtension($extension)
      {
          $valid_page_types = implode('|', Grav::instance()['config']->get('system.pages.types'));
  
          // Strip the file extension for valid page types
          if (preg_match('/(' . $valid_page_types . ')/', $extension)) {
              return true;
          }
          return false;
      }
code_tokens: public function isValidExtension ( $ extension ) { $ valid_page_types = implode ( '|' , Grav :: instance ( ) [ 'config' ] -> get ( 'system.pages.types' ) ) ; // Strip the file extension for valid page types if ( preg_match ( '/(' . $ valid_page_types . ')/' , $ extension ) ) { return true ; } return false ; }
docstring: Check if this is a valid Grav extension
  
  @param $extension
  @return bool
docstring_tokens: Check if this is a valid Grav extension