Same filename in this branch
- 8.x-3.x src/Context/ContextDefinition.php
Namespace
Drupal\rules\Context\Annotation
File
-
src/Context/Annotation/ContextDefinition.php
View source
<?php
namespace Drupal\rules\Context\Annotation;
use Drupal\Core\Annotation\ContextDefinition as CoreContextDefinition;
use Drupal\Core\Annotation\Translation;
use Drupal\rules\Context\ContextDefinition as RulesContextDefinition;
class ContextDefinition extends CoreContextDefinition {
protected $definition;
public function __construct(array $values) {
foreach ($values as $key => $value) {
if ($value instanceof Translation) {
$values[$key] = $value->get();
}
}
$this->definition = RulesContextDefinition::createFromArray($values);
}
public function get() {
return $this->definition;
}
}
Classes
| Title |
Deprecated |
Summary |
| ContextDefinition |
|
Extends the core context definition annotation object for Rules. |