function _init() { parent::_init(); $this->contentType = 'text/xml'; __Paths::set('APPLICATION_PAGE_TYPE', __Paths::get('CORE_CLASSES') . 'org/glizy/oaipmh/pageTypes/'); $this->addMetadataFormat('oai_dc', 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd', 'http://www.openarchives.org/OAI/2.0/oai_dc/', 'dc', 'http://purl.org/dc/elements/1.1/'); }
function _init() { parent::_init(); // inizialize the editing language $language = org_glizy_Session::get('glizy.editingLanguageId'); if (is_null($language)) { $ar = org_glizy_ObjectFactory::createModel('org.glizycms.core.models.Language'); $ar->language_isDefault = 1; $ar->language_FK_site_id = org_glizy_Config::get('SITE_ID'); $ar->find(); org_glizy_Session::set('glizy.editingLanguage', $ar->language_code); org_glizy_Session::set('glizy.editingLanguageId', $ar->language_id); org_glizy_Session::set('glizy.editingLanguageIsDefault', $ar->language_isDefault); $language = $ar->language_id; } org_glizy_ObjectValues::set('org.glizy', 'editingLanguageId', $language); $it = org_glizy_ObjectFactory::createModelIterator('org.glizycms.core.models.Language'); //$it = org_glizy_ObjectFactory::createModelIterator('org.glizycms.core.models.Language'); $languagesId = array(); foreach ($it as $ar) { $languagesId[] = $ar->language_id; } org_glizy_ObjectValues::set('org.glizy', 'languagesId', $languagesId); }