/** * Return manager instance * * @access protected * @param void * @return I18nLocales */ function manager() { if (!$this->manager instanceof I18nLocales) { $this->manager = I18nLocales::instance(); } return $this->manager; }
/** * Delete rows that match specific conditions. If $conditions is NULL all rows from table will be deleted * * @access public * @param string $conditions Query conditions * @return boolean */ function delete($condition = null) { if (isset($this) && instance_of($this, 'I18nLocales')) { return parent::delete($condition); } else { return I18nLocales::instance()->delete($condition); } // if }
/** * Return edit locale value URL * * @param void * @return string */ function getDescriptionIn($language_code, $country_code) { $locale = I18nLocales::instance()->getLocale($language_code, $country_code); if ($locale instanceof I18nLocale) { $locale_value = $locale->getValue($this->getName()); if ($locale_value instanceof I18nLocaleValue) { return $locale_value->getDescription(); } } return ''; }