This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class DatabaseStorageController implements EntityStorageControllerInterface, ExtensibleStorageInterface { | |
| // Helper class implements the ExtensibleStorageInterface + more needed methods like write(). | |
| protected $class = 'ExtensibleDBStorageHelper'; | |
| protected function getExtensibleStorageHelper() { | |
| ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # (c) Wolfgang Ziegler // fago | |
| # | |
| # Inotify script to trigger a command on file changes. | |
| # | |
| # The script triggers the command as soon as a file event occurs. Events | |
| # occurring during command execution are aggregated and trigger a single command | |
| # execution only. | |
| # | |
| # Usage example: Trigger rsync for synchronizing file changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PHP Strict standards: Drupal\Core\Plugin\DefaultPluginManager and Drupal\Core\Plugin\CategorizingPluginManagerTrait define the same property ($moduleHandler) in the composition of Drupal\Tests\Core\Plugin\CategorizingPluginManager. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in /home/fago2/projects/d8/drupal/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php on line 139 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Existing PR: https://github.com/fago/rules/pull/134/files | |
| $rule->addCondition('rules_test_string_condition', [ | |
| 'context_mapping' => ['text:select' => 'node:uid:0:entity:name:0:value'], | |
| ])); | |
| ]); | |
| // With value object: | |
| $rule->addCondition('rules_test_string_condition', ContextConfig() | |
| ->map('text', 'node:uid:0:entity:name:0:value') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $rule = $this->expressionManager->createRule([ | |
| 'context_definitions' => [ | |
| 'test' => [ | |
| 'type' => 'string', | |
| 'label' => 'Test string', | |
| ], | |
| ], | |
| ]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $rule = $this->expressionManager->createRule(); | |
| // The condition provides a "provided_text" variable. | |
| $rule->addCondition('rules_test_provider'); | |
| // The action provides a "concatenated" variable. | |
| $rule->addAction('rules_test_string', [ | |
| 'context_mapping' => ['text:select' => 'provided_text'], | |
| ]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $action = $this->expressionManager->createAction('rules_test_log'); | |
| <?php | |
| $config_entity = $this->storage->create([ | |
| 'id' => 'test_rule', | |
| 'expression_id' => 'rules_action', | |
| 'configuration' => $action->getConfiguration(), | |
| ]); | |
| $config_entity->save(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $rule = \Drupal\rules\Rules::expressionManager() | |
| ->createRule([ | |
| 'context_definitions' => [ | |
| 'user' => [ | |
| 'type' => 'entity:user', | |
| 'label' => 'User', | |
| 'description' => 'The user whose mail address to print.', | |
| ], | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $libraries_page_state = [ 'drupal/jquery' ]; | |
| $attachment_changes = | |
| [ | |
| 'drupal/jquery' => [ | |
| 'commands' => [ | |
| 'jquery-file1-command', 'jquery-file2-command', | |
| ], | |
| ], | |
| # Depends on jquery |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace drunomics\Composer; | |
| use Composer\Script\Event; | |
| use Composer\Util\StreamContextFactory; | |
| use Symfony\Component\Filesystem\Filesystem; | |
| /** | |
| * Scripthandler for installing (development) tools. |