original_string: public static function get($name)
      {
          $blueprints = new Blueprints('plugins://');
          $blueprint = $blueprints->get("{$name}/blueprints");
  
          // Load default configuration.
          $file = CompiledYamlFile::instance("plugins://{$name}/{$name}" . YAML_EXT);
  
          // ensure this is a valid plugin
          if (!$file->exists()) {
              return null;
          }
  
          $obj = new Data((array)$file->content(), $blueprint);
  
          // Override with user configuration.
          $obj->merge(Grav::instance()['config']->get('plugins.' . $name) ?: []);
  
          // Save configuration always to user/config.
          $file = CompiledYamlFile::instance("config://plugins/{$name}.yaml");
          $obj->file($file);
  
          return $obj;
      }
code: public static function get($name)
      {
          $blueprints = new Blueprints('plugins://');
          $blueprint = $blueprints->get("{$name}/blueprints");
  
          // Load default configuration.
          $file = CompiledYamlFile::instance("plugins://{$name}/{$name}" . YAML_EXT);
  
          // ensure this is a valid plugin
          if (!$file->exists()) {
              return null;
          }
  
          $obj = new Data((array)$file->content(), $blueprint);
  
          // Override with user configuration.
          $obj->merge(Grav::instance()['config']->get('plugins.' . $name) ?: []);
  
          // Save configuration always to user/config.
          $file = CompiledYamlFile::instance("config://plugins/{$name}.yaml");
          $obj->file($file);
  
          return $obj;
      }
code_tokens: public static function get ( $ name ) { $ blueprints = new Blueprints ( 'plugins://' ) ; $ blueprint = $ blueprints -> get ( "{$name}/blueprints" ) ; // Load default configuration. $ file = CompiledYamlFile :: instance ( "plugins://{$name}/{$name}" . YAML_EXT ) ; // ensure this is a valid plugin if ( ! $ file -> exists ( ) ) { return null ; } $ obj = new Data ( ( array ) $ file -> content ( ) , $ blueprint ) ; // Override with user configuration. $ obj -> merge ( Grav :: instance ( ) [ 'config' ] -> get ( 'plugins.' . $ name ) ? : [ ] ) ; // Save configuration always to user/config. $ file = CompiledYamlFile :: instance ( "config://plugins/{$name}.yaml" ) ; $ obj -> file ( $ file ) ; return $ obj ; }
docstring: Get a plugin by name
  
  @param string $name
  
  @return Data|null
docstring_tokens: Get a plugin by name