public function AssignOwnerNode::submit

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: An associative array containing the current state of the form.

Overrides ConfigurableActionInterface::submit

File

drupal/core/modules/node/lib/Drupal/node/Plugin/Action/AssignOwnerNode.php, line 131
Contains \Drupal\node\Plugin\Action\AssignOwnerNode.

Class

AssignOwnerNode
Assigns ownership of a node to a user.

Namespace

Drupal\node\Plugin\Action

Code

public function submit(array &$form, array &$form_state) {
  $this->configuration['owner_uid'] = $this->connection
    ->query('SELECT uid from {users} WHERE name = :name', array(
    ':name' => $form_state['values']['owner_name'],
  ))
    ->fetchField();
}