public function setLocale($locale = null) { if (is_null($locale)) { $locale = $this->getParent()->getLocale(); } $this->locale = $locale; return $this; }