/** * Overloaded to also provide entities for 'Page' class which is usually * located in custom code, hence textcollector picks it up for the wrong folder. */ function provideI18nEntities() { $entities = parent::provideI18nEntities(); if (isset($entities['Page.SINGULARNAME'])) { $entities['Page.SINGULARNAME'][3] = 'sapphire'; } if (isset($entities['Page.PLURALNAME'])) { $entities['Page.PLURALNAME'][3] = 'sapphire'; } return $entities; }
/** * Overloaded to also provide entities for 'Page' class which is usually * located in custom code, hence textcollector picks it up for the wrong folder. */ function provideI18nEntities() { $entities = parent::provideI18nEntities(); if (isset($entities['Page.SINGULARNAME'])) { $entities['Page.SINGULARNAME'][3] = 'sapphire'; } if (isset($entities['Page.PLURALNAME'])) { $entities['Page.PLURALNAME'][3] = 'sapphire'; } $types = self::page_type_classes(); foreach ($types as $type) { $inst = singleton($type); $entities[$type . '.DESCRIPTION'] = array($inst->stat('description'), PR_MEDIUM, 'Description of the page type (shown in the "add page" dialog)'); } return $entities; }
/** * Provide i18n entities for the order class * * @return array */ public function provideI18nEntities() { $entities = parent::provideI18nEntities(); // collect all the payment status values foreach ($this->dbObject('Status')->enumValues() as $value) { $key = strtoupper($value); $entities["Order.STATUS_{$key}"] = array($value, "Translation of the order status '{$value}'"); } return $entities; }
/** * Overloaded to also provide entities for 'Page' class which is usually located in custom code, hence textcollector * picks it up for the wrong folder. * * @return array */ public function provideI18nEntities() { $entities = parent::provideI18nEntities(); if (isset($entities['Page.SINGULARNAME'])) { $entities['Page.SINGULARNAME'][3] = CMS_DIR; } if (isset($entities['Page.PLURALNAME'])) { $entities['Page.PLURALNAME'][3] = CMS_DIR; } $entities[$this->class . '.DESCRIPTION'] = array($this->stat('description'), 'Description of the page type (shown in the "add page" dialog)'); $entities['SiteTree.SINGULARNAME'][0] = 'Page'; $entities['SiteTree.PLURALNAME'][0] = 'Pages'; return $entities; }
/** * Overloaded to also provide entities for 'Page' class which is usually * located in custom code, hence textcollector picks it up for the wrong folder. */ function provideI18nEntities() { $entities = parent::provideI18nEntities(); if (isset($entities['Page.SINGULARNAME'])) { $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR; } if (isset($entities['Page.PLURALNAME'])) { $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR; } $types = ClassInfo::subclassesFor('SiteTree'); foreach ($types as $k => $type) { $inst = singleton($type); $entities[$type . '.DESCRIPTION'] = array($inst->stat('description'), 'Description of the page type (shown in the "add page" dialog)'); } return $entities; }