public function get($key = null, $returns = null) { $data = $this->getData(); if (!isset($data) || $data === false) { throw new Error('Language: current language [' . $this->getLanguage() . '] does not found'); } return Util::getValueByKey($data, $key, $returns); }
/** * Undelete the deleted items * * @param string $key1 * @param string $key2 * @param array $data * @return void */ protected function undelete($key1, $key2, $data) { if (isset($this->deletedData[$key1][$key2])) { foreach ($this->deletedData[$key1][$key2] as $unsetIndex => $unsetItem) { $value = Util::getValueByKey($data, $unsetItem); if (isset($value)) { unset($this->deletedData[$key1][$key2][$unsetIndex]); } } } }