Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Drupal\institut_pascal\Plugin\Action;
- use Drupal\Core\Action\ActionBase;
- use Drupal\Core\Session\AccountInterface;
- /**
- *
- * @Action(
- * id = "institut_pascal_email_send_webform_submission",
- * label = @Translation("Send email"),
- * type = "webform_submission"
- * )
- */
- class SendEmailWebformSubmission extends ActionBase {
- /**
- * {@inheritdoc}
- */
- public function execute($entity = NULL) {
- /** @var \Drupal\webform\WebformSubmissionInterface $entity */
- ksm($entity);
- $mail_manager = \Drupal::service('plugin.manager.mail');
- ksm($mail_manager);
- }
- /**
- * {@inheritdoc}
- */
- public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
- /** @var \Drupal\webform\WebformSubmissionInterface $object */
- // $result = $object->sticky->access('edit', $account, TRUE)
- // ->andIf($object->access('update', $account, TRUE));
- return TRUE;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement