"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php" (26 Nov 2020, 1577 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "CckFieldPluginBase.php" see the Fossies "Dox" file reference documentation.

    1 <?php
    2 
    3 namespace Drupal\migrate_drupal\Plugin\migrate\cckfield;
    4 
    5 @trigger_error('CckFieldPluginBase is deprecated in Drupal 8.3.x and will be be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase instead.', E_USER_DEPRECATED);
    6 
    7 use Drupal\migrate\Plugin\MigrationInterface;
    8 use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
    9 use Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface;
   10 
   11 /**
   12  * The base class for all field plugins.
   13  *
   14  * @deprecated in drupal:8.4.0 and is removed from drupal:9.0.0. Use
   15  * \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase instead.
   16  *
   17  * @see https://www.drupal.org/node/2751897
   18  *
   19  * @ingroup migration
   20  */
   21 abstract class CckFieldPluginBase extends FieldPluginBase implements MigrateCckFieldInterface {
   22 
   23   /**
   24    * {@inheritdoc}
   25    */
   26   public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
   27     // Provide a bridge to the old method declared on the interface and now an
   28     // abstract method in this class.
   29     return $this->processCckFieldValues($migration, $field_name, $data);
   30   }
   31 
   32   /**
   33    * Apply any custom processing to the field bundle migrations.
   34    *
   35    * @param \Drupal\migrate\Plugin\MigrationInterface $migration
   36    *   The migration entity.
   37    * @param string $field_name
   38    *   The field name we're processing the value for.
   39    * @param array $data
   40    *   The array of field data from FieldValues::fieldData().
   41    */
   42   abstract public function processCckFieldValues(MigrationInterface $migration, $field_name, $data);
   43 
   44 }