This file contains 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
{"lastUpload":"2021-04-22T06:14:30.148Z","extensionVersion":"v3.4.3"} |
This file contains 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 | |
/** | |
* Uninstall workbench_moderation module and its fields, update content overview page. | |
*/ | |
function my_module_update_8001() { | |
if (\Drupal::service('module_handler')->moduleExists('workbench_moderation')) { | |
// Delete moderation_state fields. | |
// @see \Drupal\workbench_moderation\Form\PrepareUninstallForm::submitForm(). | |
// @see https://www.drupal.org/node/2627012 |
This file contains 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
use Drupal\Core\Routing\RouteMatchInterface; | |
use Drupal\Core\Entity\EntityInterface; | |
use Drupal\Component\Utility\Html; | |
use \Drupal\node\Entity\Node; | |
function relater_node_presave(EntityInterface $node) { | |
if ($node->bundle() == 'my_custom_node') { | |
$embeds = _relater_get_embeds($node); | |
$node->field_my_entityref->setValue($embeds); |