You are here

class FeedType in Feeds 8.3

Defines the Feeds feed type entity.

Plugin annotation


@ConfigEntityType(
  id = "feeds_feed_type",
  label = @Translation("Feed type"),
  module = "feeds",
  handlers = {
    "access" = "Drupal\feeds\FeedTypeAccessControlHandler",
    "list_builder" = "Drupal\feeds\FeedTypeListBuilder",
    "route_provider" = {
      "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
    },
    "form" = {
      "default" = "Drupal\feeds\FeedTypeForm",
      "create" = "Drupal\feeds\FeedTypeForm",
      "edit" = "Drupal\feeds\FeedTypeForm",
      "delete" = "Drupal\feeds\Form\FeedTypeDeleteForm"
    }
  },
  config_prefix = "feed_type",
  bundle_of = "feeds_feed",
  entity_keys = {
    "id" = "id",
    "label" = "label",
    "uuid" = "uuid",
    "status" = "status"
  },
  config_export = {
    "id",
    "label",
    "description",
    "help",
    "import_period",
    "fetcher",
    "fetcher_configuration",
    "parser",
    "parser_configuration",
    "processor",
    "processor_configuration",
    "custom_sources",
    "mappings"
  },
  links = {
    "collection" = "/admin/structure/feeds",
    "add-form" = "/admin/structure/feeds/add",
    "edit-form" = "/admin/structure/feeds/manage/{feeds_feed_type}",
    "mapping" = "/admin/structure/feeds/manage/{feeds_feed_type}/mapping",
    "delete-form" = "/admin/structure/feeds/manage/{feeds_feed_type}/delete"
  },
  admin_permission = "administer feeds"
)

Hierarchy

Expanded class hierarchy of FeedType

6 files declare their use of FeedType
EntityProcessorBase.php in src/Feeds/Processor/EntityProcessorBase.php
FeedCreationTrait.php in tests/src/Traits/FeedCreationTrait.php
FeedsJavascriptTestBase.php in tests/src/FunctionalJavascript/FeedsJavascriptTestBase.php
FeedsPermissions.php in src/FeedsPermissions.php
FeedTypeTest.php in tests/src/Unit/Entity/FeedTypeTest.php

... See full list

File

src/Entity/FeedType.php, line 68

Namespace

Drupal\feeds\Entity
View source
class FeedType extends ConfigEntityBundleBase implements FeedTypeInterface, EntityWithPluginCollectionInterface {

  /**
   * The feed type ID.
   *
   * @var string
   */
  protected $id;

  /**
   * The label of the feed type.
   *
   * @var string
   */
  protected $label;

  /**
   * Description of the feed type.
   *
   * @var string
   */
  protected $description;

  /**
   * Help information shown to the user when creating a Feed of this type.
   *
   * @var string
   */
  protected $help;

  /**
   * The import period.
   *
   * @var int
   */
  protected $import_period = 3600;

  /**
   * The types of plugins we support.
   *
   * @var array
   *
   * @todo Make this dynamic?
   */
  protected $pluginTypes = [
    'fetcher',
    'parser',
    'processor',
  ];

  /**
   * The fetcher plugin id.
   *
   * @var string
   */
  protected $fetcher = 'http';

  /**
   * The parser plugin id.
   *
   * @var string
   */
  protected $parser = 'syndication';

  /**
   * The processor plugin id.
   *
   * @var string
   */
  protected $processor = 'entity:node';

  /**
   * The fetcher plugin configuration.
   *
   * @var array
   */
  protected $fetcher_configuration = [];

  /**
   * The parser plugin configuration.
   *
   * @var array
   */
  protected $parser_configuration = [];

  /**
   * The processor plugin configuration.
   *
   * @var array
   */
  protected $processor_configuration = [];

  /**
   * The list of source to target mappings.
   *
   * @var array
   */
  protected $mappings = [];

  /**
   * The list of custom sources.
   *
   * @var array
   */
  protected $custom_sources = [];

  /**
   * The list of sources.
   *
   * @var array
   */
  protected $sources;

  /**
   * The list of targets.
   *
   * @var array
   */
  protected $targets;

  /**
   * The plugin collections that store feeds plugins keyed by plugin type.
   *
   * These are lazily instantiated on-demand.
   *
   * @var \Drupal\Component\Plugin\LazyPluginCollection[]
   */
  protected $pluginCollection;

  /**
   * The instantiated target plugins.
   *
   * @var \Drupal\feeds\Plugin\Type\Target\TargetInterface[]
   */
  protected $targetPlugins = [];

  /**
   * The instantiated source plugins.
   *
   * @var \Drupal\feeds\Plugin\Type\Target\SourceInterface[]
   */
  protected $sourcePlugins = [];

  /**
   * {@inheritdoc}
   */
  public function __sleep() {
    $vars = parent::__sleep();

    // Do not serialize pluginCollection as this can contain a
    // \Drupal\Core\Entity\EntityType instance which can contain a
    // stringTranslation object that is not serializable.
    // @see https://www.drupal.org/project/drupal/issues/2893029
    $vars = array_flip($vars);
    unset($vars['pluginCollection']);
    $vars = array_flip($vars);
    return $vars;
  }

  /**
   * {@inheritdoc}
   */
  public function set($property_name, $value) {

    // Remove mappings when processor changes.
    if ($property_name === 'processor' && $this->processor !== $value) {
      $this
        ->removeMappings();
    }
    return parent::set($property_name, $value);
  }

  /**
   * {@inheritdoc}
   */
  public function getDescription() {
    return $this->description;
  }

  /**
   * {@inheritdoc}
   */
  public function getHelp() {
    return $this->help;
  }

  /**
   * {@inheritdoc}
   */
  public function isLocked() {
    foreach ($this
      ->getPlugins() as $plugin) {
      if ($plugin instanceof LockableInterface && $plugin
        ->isLocked()) {
        return TRUE;
      }
    }
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function getImportPeriod() {
    return $this->import_period;
  }

  /**
   * {@inheritdoc}
   */
  public function setImportPeriod($import_period) {
    $this->import_period = (int) $import_period;
  }

  /**
   * {@inheritdoc}
   */
  public function getMappingSources() {
    if ($this->sources === NULL) {
      $this->sources = $this
        ->getParser()
        ->getMappingSources();
      $definitions = $this
        ->getSourcePluginManager()
        ->getDefinitions();
      foreach ($definitions as $definition) {
        $class = $definition['class'];
        $class::sources($this->sources, $this, $definition);
      }
      $this
        ->alter('feeds_sources', $this->sources);
    }
    return $this->sources + $this->custom_sources;
  }

  /**
   * {@inheritdoc}
   */
  public function getMappingTargets() {
    if ($this->targets === NULL) {
      $this->targets = [];
      $definitions = \Drupal::service('plugin.manager.feeds.target')
        ->getDefinitions();
      foreach ($definitions as $definition) {
        $class = $definition['class'];
        $class::targets($this->targets, $this, $definition);
      }
      \Drupal::moduleHandler()
        ->alter('feeds_targets', $this->targets, $this);
    }
    return $this->targets;
  }

  /**
   * {@inheritdoc}
   */
  public function getMappings() {
    return $this->mappings;
  }

  /**
   * {@inheritdoc}
   */
  public function setMappings(array $mappings) {
    $this->mappings = $mappings;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function addMapping(array $mapping) {
    $this->mappings[] = $mapping;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function removeMapping($delta) {
    unset($this->mappings[$delta]);
    unset($this->targetPlugins[$delta]);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function removeMappings() {
    $this->mappings = [];
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getMappedSources() {
    $sources = [];
    foreach ($this
      ->getMappings() as $mapping) {
      foreach ($mapping['map'] as $column => $source) {
        if ($source === '') {

          // Skip empty sources.
          continue;
        }
        $sources[$source] = $source;
      }
    }
    return $sources;
  }

  /**
   * {@inheritdoc}
   */
  public function addCustomSource($name, array $source) {
    $this->custom_sources[$name] = $source;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getCustomSource($name) {
    if (!isset($this->custom_sources[$name])) {
      return NULL;
    }
    return $this->custom_sources[$name];
  }

  /**
   * {@inheritdoc}
   */
  public function customSourceExists($name) {
    return isset($this->custom_sources[$name]);
  }

  /**
   * {@inheritdoc}
   */
  public function removeCustomSource($name) {
    unset($this->custom_sources[$name]);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getPlugins() {
    $plugins = [];
    foreach ($this->pluginTypes as $type) {
      $plugins[$type] = $this
        ->getPlugin($type);
    }
    return $plugins;
  }

  /**
   * {@inheritdoc}
   */
  public function getFetcher() {
    return $this
      ->getPlugin('fetcher');
  }

  /**
   * {@inheritdoc}
   */
  public function getParser() {
    return $this
      ->getPlugin('parser');
  }

  /**
   * {@inheritdoc}
   */
  public function getProcessor() {
    return $this
      ->getPlugin('processor');
  }

  /**
   * Returns the configured plugin for this type given the plugin type.
   *
   * @param string $plugin_type
   *   The plugin type to return.
   *
   * @return \Drupal\feeds\Plugin\PluginInterface
   *   The plugin specified.
   */
  protected function getPlugin($plugin_type) {
    $bags = $this
      ->getPluginCollections();
    return $bags[$plugin_type . '_configuration']
      ->get($this->{$plugin_type});
  }

  /**
   * {@inheritdoc}
   *
   * @todo Use plugin bag.
   */
  public function getTargetPlugin($delta) {
    if (isset($this->targetPlugins[$delta])) {
      return $this->targetPlugins[$delta];
    }
    $targets = $this
      ->getMappingTargets();
    $target = $this->mappings[$delta]['target'];

    // Make sure that the target exists.
    if (!isset($targets[$target])) {

      // The target is missing!
      throw new MissingTargetException(sprintf('The Feeds target "%s" does not exist.', $target));
    }

    // The target is a plugin.
    $id = $targets[$target]
      ->getPluginId();
    $configuration = [];
    $configuration['feed_type'] = $this;
    $configuration['target_definition'] = $targets[$target];
    if (isset($this->mappings[$delta]['settings'])) {
      $configuration += $this->mappings[$delta]['settings'];
    }
    $this->targetPlugins[$delta] = \Drupal::service('plugin.manager.feeds.target')
      ->createInstance($id, $configuration);
    return $this->targetPlugins[$delta];
  }

  /**
   * {@inheritdoc}
   *
   * @todo Use plugin bag.
   */
  public function getSourcePlugin($source) {
    if (!isset($this->sourcePlugins[$source])) {
      $sources = $this
        ->getMappingSources();

      // The source is a plugin.
      if (isset($sources[$source]['id'])) {
        $configuration = [
          'feed_type' => $this,
          'source' => $source,
        ];
        $this->sourcePlugins[$source] = $this
          ->getSourcePluginManager()
          ->createInstance($sources[$source]['id'], $configuration);
      }
      else {
        $this->sourcePlugins[$source] = FALSE;
      }
    }
    return $this->sourcePlugins[$source];
  }

  /**
   * {@inheritdoc}
   */
  public function getPluginOptionsList($plugin_type) {
    $manager = \Drupal::service("plugin.manager.feeds.{$plugin_type}");
    $options = [];
    foreach ($manager
      ->getDefinitions() as $id => $definition) {
      $options[$id] = $definition['title'];
    }
    return $options;
  }

  /**
   * {@inheritdoc}
   */
  public function getPluginCollections() {
    if (!isset($this->pluginCollection)) {
      $this->pluginCollection = [];
      foreach ($this->pluginTypes as $type) {
        $this->pluginCollection[$type . '_configuration'] = new FeedsSingleLazyPluginCollection(\Drupal::service("plugin.manager.feeds.{$type}"), $this
          ->get($type), $this
          ->get($type . '_configuration'), $this);
      }
    }
    return $this->pluginCollection;
  }

  /**
   * {@inheritdoc}
   */
  public function uri() {
    return [
      'path' => 'admin/structure/feeds/manage/' . $this
        ->id(),
      'options' => [
        'entity_type' => $this->entityType,
        'entity' => $this,
      ],
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function preSave(EntityStorageInterface $storage_controller, $update = TRUE) {
    foreach ($this
      ->getPlugins() as $type => $plugin) {
      $plugin
        ->onFeedTypeSave($update);
    }
    foreach ($this->targetPlugins as $delta => $target_plugin) {
      if ($target_plugin instanceof ConfigurableTargetInterface) {
        $this->mappings[$delta]['settings'] = $target_plugin
          ->getConfiguration();
      }
      else {
        unset($this->mappings[$delta]['settings']);
      }
    }
    $this->mappings = array_values($this->mappings);
    parent::preSave($storage_controller, $update);
  }

  /**
   * {@inheritdoc}
   */
  public function postSave(EntityStorageInterface $storage, $update = TRUE) {
    parent::postSave($storage, $update);
    if (!$update) {

      // Clear the queue worker plugin cache so that our derivatives will be
      // found.
      \Drupal::service('plugin.manager.queue_worker')
        ->clearCachedDefinitions();
      \Drupal::queue('feeds_feed_refresh:' . $this
        ->id())
        ->createQueue();
    }
  }

  /**
   * {@inheritdoc}
   */
  public static function postDelete(EntityStorageInterface $storage, array $entities) {
    foreach ($entities as $entity) {
      foreach ($entity
        ->getPlugins() as $plugin) {
        $plugin
          ->onFeedTypeDelete();
      }

      // Delete any existing queues related to this type.
      if ($queue = \Drupal::queue('feeds_feed_refresh:' . $entity
        ->id())) {
        $queue
          ->deleteQueue();
      }
    }

    // Clear the queue worker plugin cache to remove this derivative.
    \Drupal::service('plugin.manager.queue_worker')
      ->clearCachedDefinitions();
  }

  /**
   * {@inheritdoc}
   */
  public function toArray() {
    $properties = parent::toArray();
    $properties['mappings'] = $this->mappings;
    return $properties;
  }

  /**
   * Returns the source plugin manager.
   *
   * @return \Drupal\feeds\Plugin\Type\FeedsPluginManager
   *   The source plugin manager.
   */
  protected function getSourcePluginManager() {
    return \Drupal::service('plugin.manager.feeds.source');
  }

  /**
   * Wrapper around \Drupal\Core\Extension\ModuleHandlerInterface::alter().
   *
   * @param string|array $type
   *   A string describing the type of the alterable $data or an array if
   *   hook_TYPE_alter() needs to be invoked for each value in the array.
   * @param mixed $data
   *   The variable to be altered.
   *
   * @see \Drupal\Core\Extension\ModuleHandlerInterface::alter()
   */
  protected function alter($type, &$data) {
    return \Drupal::moduleHandler()
      ->alter($type, $data, $this);
  }

  /**
   * {@inheritdoc}
   */
  public function calculateDependencies() {
    parent::calculateDependencies();

    // Calculate plugin dependencies for each target plugin.
    // @todo support other plugin types as well.
    foreach ($this
      ->getMappings() as $delta => $mapping) {
      try {
        $plugin = $this
          ->getTargetPlugin($delta);
        $this
          ->calculatePluginDependencies($plugin);
      } catch (MissingTargetException $e) {

        // Log an error when a target is not found.
        watchdog_exception('feeds', $e);
      }
    }
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function onDependencyRemoval(array $dependencies) {
    $changed = FALSE;

    // Don't intervene if the feeds module is removed.
    if (isset($dependencies['module']) && in_array('feeds', $dependencies['module'])) {
      return FALSE;
    }

    // Check each target plugin for if they want to do something on dependency
    // removal.
    foreach ($this
      ->getMappings() as $delta => $mapping) {
      $plugin = $this
        ->getTargetPlugin($delta);
      if ($plugin instanceof DependentWithRemovalPluginInterface) {
        if ($plugin
          ->onDependencyRemoval($dependencies)) {
          $this
            ->removeMapping($delta);
          $changed = TRUE;
        }
      }
    }
    if ($changed) {

      // Force a recalculation of the dependencies if we made changes.
      $this
        ->calculateDependencies();
    }
    return $changed;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CacheableDependencyTrait::$cacheContexts protected property Cache contexts.
CacheableDependencyTrait::$cacheMaxAge protected property Cache max-age.
CacheableDependencyTrait::$cacheTags protected property Cache tags.
CacheableDependencyTrait::setCacheability protected function Sets cacheability; useful for value object constructors.
ConfigEntityBase::$isUninstalling private property Whether the config is being deleted by the uninstall process.
ConfigEntityBase::$langcode protected property The language code of the entity's default language.
ConfigEntityBase::$originalId protected property The original ID of the configuration entity.
ConfigEntityBase::$status protected property The enabled/disabled status of the configuration entity. 4
ConfigEntityBase::$third_party_settings protected property Third party entity settings.
ConfigEntityBase::$trustedData protected property Trust supplied data and not use configuration schema on save.
ConfigEntityBase::$uuid protected property The UUID for this entity.
ConfigEntityBase::$_core protected property Information maintained by Drupal core about configuration.
ConfigEntityBase::addDependency protected function Overrides \Drupal\Core\Entity\DependencyTrait:addDependency().
ConfigEntityBase::createDuplicate public function Creates a duplicate of the entity. Overrides EntityBase::createDuplicate 1
ConfigEntityBase::disable public function Disables the configuration entity. Overrides ConfigEntityInterface::disable 1
ConfigEntityBase::enable public function Enables the configuration entity. Overrides ConfigEntityInterface::enable
ConfigEntityBase::get public function Returns the value of a property. Overrides ConfigEntityInterface::get
ConfigEntityBase::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches. Overrides EntityBase::getCacheTagsToInvalidate 1
ConfigEntityBase::getConfigDependencyName public function Gets the configuration dependency name. Overrides EntityBase::getConfigDependencyName
ConfigEntityBase::getConfigManager protected static function Gets the configuration manager.
ConfigEntityBase::getConfigTarget public function Gets the configuration target identifier for the entity. Overrides EntityBase::getConfigTarget
ConfigEntityBase::getDependencies public function Gets the configuration dependencies. Overrides ConfigEntityInterface::getDependencies
ConfigEntityBase::getOriginalId public function Gets the original ID. Overrides EntityBase::getOriginalId
ConfigEntityBase::getThirdPartyProviders public function Gets the list of third parties that store information. Overrides ThirdPartySettingsInterface::getThirdPartyProviders
ConfigEntityBase::getThirdPartySetting public function Gets the value of a third-party setting. Overrides ThirdPartySettingsInterface::getThirdPartySetting
ConfigEntityBase::getThirdPartySettings public function Gets all third-party settings of a given module. Overrides ThirdPartySettingsInterface::getThirdPartySettings
ConfigEntityBase::getTypedConfig protected function Gets the typed config manager.
ConfigEntityBase::hasTrustedData public function Gets whether on not the data is trusted. Overrides ConfigEntityInterface::hasTrustedData
ConfigEntityBase::invalidateTagsOnDelete protected static function Override to never invalidate the individual entities' cache tags; the config system already invalidates them. Overrides EntityBase::invalidateTagsOnDelete
ConfigEntityBase::invalidateTagsOnSave protected function Override to never invalidate the entity's cache tag; the config system already invalidates it. Overrides EntityBase::invalidateTagsOnSave
ConfigEntityBase::isInstallable public function Checks whether this entity is installable. Overrides ConfigEntityInterface::isInstallable 2
ConfigEntityBase::isNew public function Overrides Entity::isNew(). Overrides EntityBase::isNew
ConfigEntityBase::isUninstalling public function Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface::isUninstalling
ConfigEntityBase::link public function Deprecated way of generating a link to the entity. See toLink(). Overrides EntityBase::link
ConfigEntityBase::preDelete public static function Acts on entities before they are deleted and before hooks are invoked. Overrides EntityBase::preDelete 8
ConfigEntityBase::save public function Saves an entity permanently. Overrides EntityBase::save 1
ConfigEntityBase::setOriginalId public function Sets the original ID. Overrides EntityBase::setOriginalId
ConfigEntityBase::setStatus public function Sets the status of the configuration entity. Overrides ConfigEntityInterface::setStatus
ConfigEntityBase::setThirdPartySetting public function Sets the value of a third-party setting. Overrides ThirdPartySettingsInterface::setThirdPartySetting
ConfigEntityBase::setUninstalling public function
ConfigEntityBase::sort public static function Helper callback for uasort() to sort configuration entities by weight and label. 6
ConfigEntityBase::status public function Returns whether the configuration entity is enabled. Overrides ConfigEntityInterface::status 4
ConfigEntityBase::toUrl public function Gets the URL object for the entity. Overrides EntityBase::toUrl
ConfigEntityBase::trustData public function Sets that the data should be trusted. Overrides ConfigEntityInterface::trustData
ConfigEntityBase::unsetThirdPartySetting public function Unsets a third-party setting. Overrides ThirdPartySettingsInterface::unsetThirdPartySetting
ConfigEntityBase::url public function Gets the public URL for this entity. Overrides EntityBase::url
ConfigEntityBase::urlInfo public function Gets the URL object for the entity. Overrides EntityBase::urlInfo
ConfigEntityBase::__construct public function Constructs an Entity object. Overrides EntityBase::__construct 10
ConfigEntityBundleBase::deleteDisplays protected function Deletes display if a bundle is deleted.
ConfigEntityBundleBase::loadDisplays protected function Returns view or form displays for this bundle.
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function Aliased as: traitSleep 1
DependencySerializationTrait::__wakeup public function 2
DependencyTrait::$dependencies protected property The object's dependencies.
DependencyTrait::addDependencies protected function Adds multiple dependencies.
DependencyTrait::addDependency protected function Adds a dependency. Aliased as: addDependencyTrait
EntityBase::$enforceIsNew protected property Boolean indicating whether the entity should be forced to be new.
EntityBase::$entityTypeId protected property The entity type.
EntityBase::$typedData protected property A typed data object wrapping this entity.
EntityBase::access public function Checks data value access. Overrides AccessibleInterface::access 1
EntityBase::bundle public function Gets the bundle of the entity. Overrides EntityInterface::bundle 1
EntityBase::create public static function Constructs a new entity object, without permanently saving it. Overrides EntityInterface::create
EntityBase::delete public function Deletes an entity permanently. Overrides EntityInterface::delete 2
EntityBase::enforceIsNew public function Enforces an entity to be new. Overrides EntityInterface::enforceIsNew
EntityBase::entityManager Deprecated protected function Gets the entity manager.
EntityBase::entityTypeBundleInfo protected function Gets the entity type bundle info service.
EntityBase::entityTypeManager protected function Gets the entity type manager.
EntityBase::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyTrait::getCacheContexts
EntityBase::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyTrait::getCacheMaxAge
EntityBase::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyTrait::getCacheTags
EntityBase::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. Overrides EntityInterface::getConfigDependencyKey
EntityBase::getEntityType public function Gets the entity type definition. Overrides EntityInterface::getEntityType
EntityBase::getEntityTypeId public function Gets the ID of the type of the entity. Overrides EntityInterface::getEntityTypeId
EntityBase::getListCacheTagsToInvalidate protected function The list cache tags to invalidate for this entity.
EntityBase::getTypedData public function Gets a typed data object for this entity object. Overrides EntityInterface::getTypedData
EntityBase::hasLinkTemplate public function Indicates if a link template exists for a given key. Overrides EntityInterface::hasLinkTemplate
EntityBase::id public function Gets the identifier. Overrides EntityInterface::id 11
EntityBase::label public function Gets the label of the entity. Overrides EntityInterface::label 6
EntityBase::language public function Gets the language of the entity. Overrides EntityInterface::language 1
EntityBase::languageManager protected function Gets the language manager.
EntityBase::linkTemplates protected function Gets an array link templates. 1
EntityBase::load public static function Loads an entity. Overrides EntityInterface::load
EntityBase::loadMultiple public static function Loads one or more entities. Overrides EntityInterface::loadMultiple
EntityBase::postCreate public function Acts on a created entity before hooks are invoked. Overrides EntityInterface::postCreate 4
EntityBase::postLoad public static function Acts on loaded entities. Overrides EntityInterface::postLoad 2
EntityBase::preCreate public static function Changes the values of an entity before it is created. Overrides EntityInterface::preCreate 5
EntityBase::referencedEntities public function Gets a list of entities referenced by this entity. Overrides EntityInterface::referencedEntities 1
EntityBase::toLink public function Generates the HTML for a link to this entity. Overrides EntityInterface::toLink
EntityBase::uriRelationships public function Gets a list of URI relationships supported by this entity. Overrides EntityInterface::uriRelationships
EntityBase::urlRouteParameters protected function Gets an array of placeholders for this entity. 2
EntityBase::uuid public function Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface::uuid 1
EntityBase::uuidGenerator protected function Gets the UUID generator.
FeedType::$custom_sources protected property The list of custom sources.
FeedType::$description protected property Description of the feed type.
FeedType::$fetcher protected property The fetcher plugin id.
FeedType::$fetcher_configuration protected property The fetcher plugin configuration.
FeedType::$help protected property Help information shown to the user when creating a Feed of this type.
FeedType::$id protected property The feed type ID.
FeedType::$import_period protected property The import period.
FeedType::$label protected property The label of the feed type.
FeedType::$mappings protected property The list of source to target mappings.
FeedType::$parser protected property The parser plugin id.
FeedType::$parser_configuration protected property The parser plugin configuration.
FeedType::$pluginCollection protected property The plugin collections that store feeds plugins keyed by plugin type.
FeedType::$pluginTypes protected property The types of plugins we support.
FeedType::$processor protected property The processor plugin id.
FeedType::$processor_configuration protected property The processor plugin configuration.
FeedType::$sourcePlugins protected property The instantiated source plugins.
FeedType::$sources protected property The list of sources.
FeedType::$targetPlugins protected property The instantiated target plugins.
FeedType::$targets protected property The list of targets.
FeedType::addCustomSource public function Adds a custom source that can be used in mapping. Overrides FeedTypeInterface::addCustomSource
FeedType::addMapping public function Adds a mapping to the feed type. Overrides FeedTypeInterface::addMapping
FeedType::alter protected function Wrapper around \Drupal\Core\Extension\ModuleHandlerInterface::alter().
FeedType::calculateDependencies public function Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityBase::calculateDependencies
FeedType::customSourceExists public function Returns if a custom source already exists. Overrides FeedTypeInterface::customSourceExists
FeedType::getCustomSource public function Gets a custom a source. Overrides FeedTypeInterface::getCustomSource
FeedType::getDescription public function Returns the description of the feed type. Overrides FeedTypeInterface::getDescription
FeedType::getFetcher public function Returns the configured fetcher for this feed type. Overrides FeedTypeInterface::getFetcher
FeedType::getHelp public function Gets the help information. Overrides FeedTypeInterface::getHelp
FeedType::getImportPeriod public function Returns the import period. Overrides FeedTypeInterface::getImportPeriod
FeedType::getMappedSources public function Returns a list of mapped sources. Overrides FeedTypeInterface::getMappedSources
FeedType::getMappings public function Returns the mappings for this feed type. Overrides FeedTypeInterface::getMappings
FeedType::getMappingSources public function Returns the mapping sources for this feed type. Overrides FeedTypeInterface::getMappingSources
FeedType::getMappingTargets public function Returns the mapping targets for this feed type. Overrides FeedTypeInterface::getMappingTargets
FeedType::getParser public function Returns the configured parser for this feed type. Overrides FeedTypeInterface::getParser
FeedType::getPlugin protected function Returns the configured plugin for this type given the plugin type.
FeedType::getPluginCollections public function Gets the plugin collections used by this object. Overrides ObjectWithPluginCollectionInterface::getPluginCollections
FeedType::getPluginOptionsList public function
FeedType::getPlugins public function Returns the configured plugins for this feed type. Overrides FeedTypeInterface::getPlugins
FeedType::getProcessor public function Returns the configured processor for this feed type. Overrides FeedTypeInterface::getProcessor
FeedType::getSourcePlugin public function @todo Use plugin bag. Overrides FeedTypeInterface::getSourcePlugin
FeedType::getSourcePluginManager protected function Returns the source plugin manager.
FeedType::getTargetPlugin public function @todo Use plugin bag. Overrides FeedTypeInterface::getTargetPlugin
FeedType::isLocked public function Returns whether the feed type is considered locked. Overrides FeedTypeInterface::isLocked
FeedType::onDependencyRemoval public function Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityBase::onDependencyRemoval
FeedType::postDelete public static function Acts on deleted entities before the delete hook is invoked. Overrides ConfigEntityBundleBase::postDelete
FeedType::postSave public function Acts on a saved entity before the insert or update hook is invoked. Overrides ConfigEntityBundleBase::postSave
FeedType::preSave public function Acts on an entity before the presave hook is invoked. Overrides ConfigEntityBundleBase::preSave
FeedType::removeCustomSource public function Removes a custom a source. Overrides FeedTypeInterface::removeCustomSource
FeedType::removeMapping public function Removes a mapping from the feed type. Overrides FeedTypeInterface::removeMapping
FeedType::removeMappings public function Removes all mappings. Overrides FeedTypeInterface::removeMappings
FeedType::set public function Sets the value of a property. Overrides ConfigEntityBase::set
FeedType::setImportPeriod public function Sets the import period. Overrides FeedTypeInterface::setImportPeriod
FeedType::setMappings public function Sets the mappings for the feed type. Overrides FeedTypeInterface::setMappings
FeedType::toArray public function Gets an array of all property values. Overrides ConfigEntityBase::toArray
FeedType::uri public function
FeedType::__sleep public function Overrides ConfigEntityBase::__sleep
FeedTypeInterface::SCHEDULE_CONTINUOUSLY constant Indicates that a feed should be imported as often as possible.
FeedTypeInterface::SCHEDULE_NEVER constant Indicates that a feed should never be scheduled.
PluginDependencyTrait::calculatePluginDependencies protected function Calculates and adds dependencies of a specific plugin instance. 1
PluginDependencyTrait::getPluginDependencies protected function Calculates and returns dependencies of a specific plugin instance.
PluginDependencyTrait::moduleHandler protected function Wraps the module handler. 1
PluginDependencyTrait::themeHandler protected function Wraps the theme handler. 1
RefinableCacheableDependencyTrait::addCacheableDependency public function 1
RefinableCacheableDependencyTrait::addCacheContexts public function
RefinableCacheableDependencyTrait::addCacheTags public function
RefinableCacheableDependencyTrait::mergeCacheMaxAge public function
SynchronizableEntityTrait::$isSyncing protected property Whether this entity is being created, updated or deleted through a synchronization process.
SynchronizableEntityTrait::isSyncing public function
SynchronizableEntityTrait::setSyncing public function