Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Callback.php

function Callback::__construct

Same name in this branch
  1. 11.1.x vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php \PHPUnit\Framework\Constraint\Callback::__construct()
  2. 11.1.x vendor/symfony/validator/Constraints/Callback.php \Symfony\Component\Validator\Constraints\Callback::__construct()

File

core/modules/migrate/src/Plugin/migrate/process/Callback.php, line 83

Class

Callback
Passes the source value to a callback.

Namespace

Drupal\migrate\Plugin\migrate\process

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition) {
    if (!isset($configuration['callable'])) {
        throw new \InvalidArgumentException('The "callable" must be set.');
    }
    elseif (!is_callable($configuration['callable'])) {
        throw new \InvalidArgumentException('The "callable" must be a valid function or method.');
    }
    parent::__construct($configuration, $plugin_id, $plugin_definition);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal