diff vendor/chi-teck/drupal-code-generator/templates/d8/plugin/action.twig @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
line wrap: on
line diff
--- a/vendor/chi-teck/drupal-code-generator/templates/d8/plugin/action.twig	Thu Feb 28 13:11:55 2019 +0000
+++ b/vendor/chi-teck/drupal-code-generator/templates/d8/plugin/action.twig	Thu May 09 15:34:47 2019 +0100
@@ -22,7 +22,7 @@
  * )
  *
  * @DCG
- * For simple updating entity fields consider extending FieldUpdateActionBase.
+ * For a simple updating entity fields consider extending FieldUpdateActionBase.
  */
 class {{ class }} extends {{ configurable ? 'ConfigurableActionBase' : 'ActionBase' }} {
 
@@ -39,7 +39,7 @@
    */
   public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
     $form['title'] = [
-      '#title' => t('New title'),
+      '#title' => $this->t('New title'),
       '#type' => 'textfield',
       '#required' => TRUE,
       '#default_value' => $this->configuration['title'],
@@ -73,7 +73,7 @@
 {% if configurable %}
     $node->setTitle($this->configuration['title'])->save();
 {% else %}
-    $node->setTitle(t('New title'))->save();
+    $node->setTitle($this->t('New title'))->save();
 {% endif %}
   }