You are here

public function Language::setAsDefault in Little helpers 7

Same name and namespace in other branches
  1. 7.2 src/Locale/Language.php \Drupal\little_helpers\Locale\Language::setAsDefault()

Set this language as the default language.

Return value

$this for chaining

1 call to Language::setAsDefault()
Language::save in src/Locale/Language.php
Save language to the database and call hooks as needed.

File

src/Locale/Language.php, line 125

Class

Language
Model object for the {languages} table.

Namespace

Drupal\little_helpers\Locale

Code

public function setAsDefault() {
  \variable_set('language_default', (object) (array) $this);
  return $this;
}