コード例 #1
0
 /**
  * Tests the action execution.
  *
  * @covers ::execute
  */
 public function testActionExecution()
 {
     $alias = 'about/team';
     $this->aliasStorage->delete(['alias' => $alias])->shouldBeCalledTimes(1);
     $this->action->setContextValue('alias', $alias);
     $this->action->execute();
 }
コード例 #2
0
 /**
  * Tests the action execution.
  *
  * @covers ::execute
  */
 public function testActionExecution()
 {
     $path = 'node/1';
     $this->aliasStorage->delete(['path' => $path])->shouldBeCalledTimes(1);
     $this->action->setContextValue('path', $path);
     $this->action->execute();
 }
コード例 #3
0
 /**
  * Delete an existing alias by a given path.
  *
  * @param string $path
  *   Existing system path.
  */
 protected function doExecute($path)
 {
     $this->aliasStorage->delete(['path' => $path]);
 }
コード例 #4
0
ファイル: DeleteForm.php プロジェクト: aWEBoLabs/taxi
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     $this->aliasStorage->delete(array('pid' => $this->pathAlias['pid']));
     $form_state->setRedirect('path.admin_overview');
 }
コード例 #5
0
 /**
  * {@inheritdoc}
  */
 public function deleteMultiple($pids)
 {
     foreach ($pids as $pid) {
         $this->aliasStorage->delete(array('pid' => $pid));
     }
 }
コード例 #6
0
ファイル: DeleteForm.php プロジェクト: shumer/blog
 /**
  * Implements \Drupal\Core\Form\FormInterface::submitForm().
  */
 public function submitForm(array &$form, array &$form_state)
 {
     $this->aliasStorage->delete(array('pid' => $this->pathAlias['pid']));
     $form_state['redirect'] = 'admin/config/search/path';
 }
コード例 #7
0
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     $alias = $this->getContextValue('alias');
     $this->aliasStorage->delete(['alias' => $alias]);
 }
コード例 #8
0
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     $path = $this->getContextValue('path');
     $this->aliasStorage->delete(['path' => $path]);
 }