Commit cfa3c75a authored by webchick's avatar webchick

Issue #2089729 by tim.plunkett: Formalize setter return value.

parent 15ed2237
......@@ -133,8 +133,7 @@ protected function config($name) {
* @param \Drupal\Core\StringTranslation\TranslationInterface $translation_manager
* The translation manager.
*
* @return self
* The entity form.
* @return $this
*/
public function setTranslationManager(TranslationInterface $translation_manager) {
$this->translationManager = $translation_manager;
......@@ -147,8 +146,7 @@ public function setTranslationManager(TranslationInterface $translation_manager)
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* The config factory.
*
* @return self
* The form.
* @return $this
*/
public function setConfigFactory(ConfigFactory $config_factory) {
$this->configFactory = $config_factory;
......@@ -173,9 +171,12 @@ protected function getRequest() {
*
* @param \Symfony\Component\HttpFoundation\Request $request
* The request object.
*
* @return $this
*/
public function setRequest(Request $request) {
$this->request = $request;
return $this;
}
/**
......@@ -206,9 +207,12 @@ protected function urlGenerator() {
*
* @param \Drupal\Core\Routing\UrlGeneratorInterface
* The URL generator.
*
* @return $this
*/
public function setUrlGenerator(UrlGeneratorInterface $url_generator) {
$this->urlGenerator = $url_generator;
return $this;
}
/**
......@@ -250,9 +254,12 @@ protected function errorHandler() {
* (optional) The error message to present to the user.
*
* @see \Drupal\Core\Form\FormErrorInterface::setErrorByName()
*
* @return $this
*/
protected function setFormError($name, array &$form_state, $message = '') {
$this->errorHandler()->setErrorByName($name, $form_state, $message);
return $this;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment