Drupal 8  8.0.2
TestProcessor Class Reference
Inheritance diagram for TestProcessor:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config)
 
 buildConfigurationForm (array $form, FormStateInterface $form_state)
 
 submitConfigurationForm (array &$form, FormStateInterface $form_state)
 
 process (FeedInterface $feed)
 
 delete (FeedInterface $feed)
 
 postProcess (FeedInterface $feed)
 
 getConfiguration ()
 
 setConfiguration (array $configuration)
 
- Public Member Functions inherited from AggregatorPluginSettingsBase
 defaultConfiguration ()
 
 validateConfigurationForm (array &$form, FormStateInterface $form_state)
 
 calculateDependencies ()
 
- Public Member Functions inherited from PluginFormInterface
 validateConfigurationForm (array &$form, FormStateInterface $form_state)
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 

Protected Member Functions

 getEditableConfigNames ()
 

Protected Attributes

 $configFactory
 

Detailed Description

Defines a default processor implementation.

Creates lightweight records from feed items.

( id = "aggregator_test_processor", title = ("Test processor"), description = ("Test generic processor functionality.") )

Constructor & Destructor Documentation

__construct ( array  $configuration,
  $plugin_id,
  $plugin_definition,
ConfigFactoryInterface  $config 
)

Constructs a TestProcessor object.

Parameters
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin_id for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
\Drupal\Core\Config\ConfigFactoryInterface$configThe configuration factory object.

References Drupal\configFactory(), and TestProcessor\getConfiguration().

Here is the call graph for this function:

Member Function Documentation

buildConfigurationForm ( array  $form,
FormStateInterface  $form_state 
)

{Form constructor.Plugin forms are embedded in other forms. In order to know where the plugin form is located in the parent form, #parents and #array_parents must be known, but these are not available during the initial build phase. In order to have these properties available when building the plugin form's elements, let this method return a form element that has a #process callback and build the rest of the form in the callback. By the time the callback is executed, the element's #parents and #array_parents properties will have been set by the form API. For more documentation on #parents and #array_parents, see .

Parameters
array$formAn associative array containing the initial structure of the plugin form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the complete form.
Returns
array The form structure.
}

Implements PluginFormInterface.

References Drupal\config(), and t().

Here is the call graph for this function:

static create ( ContainerInterface  $container,
array  $configuration,
  $plugin_id,
  $plugin_definition 
)
static

{Creates an instance of the plugin.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe container to pull out services used in the plugin.
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin ID for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
Returns
static Returns an instance of this plugin.
}

Implements ContainerFactoryPluginInterface.

delete ( FeedInterface  $feed)

{Deletes stored feed data.Called by aggregator if either a feed is deleted or a user clicks on "delete items".

Parameters
\Drupal\aggregator\FeedInterface$feedThe $feed object whose items are being deleted.
}

Implements ProcessorInterface.

getConfiguration ( )

{Gets this plugin's configuration.

Returns
array An array of this plugin's configuration.
}

Implements ConfigurablePluginInterface.

References Drupal\configFactory().

Referenced by TestProcessor\__construct().

Here is the call graph for this function:

Here is the caller graph for this function:

getEditableConfigNames ( )
protected

{}

postProcess ( FeedInterface  $feed)

{Refreshes feed information.Called after the processing of the feed is completed by all selected processors.

Parameters
\Drupal\aggregator\FeedInterface$feedObject describing feed.
See Also
aggregator_refresh()
}

Implements ProcessorInterface.

References EntityInterface\save().

Here is the call graph for this function:

process ( FeedInterface  $feed)

{Processes feed data.

Parameters
\Drupal\aggregator\FeedInterface$feedA feed object representing the resource to be processed. $feed->items contains an array of feed items downloaded and parsed at the parsing stage. See ::parse() for the basic format of a single item in the $feed->items array. For the exact format refer to the particular parser in use.
}

Implements ProcessorInterface.

setConfiguration ( array  $configuration)

{Sets the configuration for this plugin instance.

Parameters
array$configurationAn associative array containing the plugin's configuration.
}

Implements ConfigurablePluginInterface.

References Drupal\config().

Referenced by TestProcessor\submitConfigurationForm().

Here is the call graph for this function:

Here is the caller graph for this function:

submitConfigurationForm ( array &  $form,
FormStateInterface  $form_state 
)

{Form submission handler.

Parameters
array$formAn associative array containing the structure of the plugin form as built by static::buildConfigurationForm().
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the complete form.
}

Implements PluginFormInterface.

References FormStateInterface\getValue(), and TestProcessor\setConfiguration().

Here is the call graph for this function:


The documentation for this class was generated from the following file: