/** * @since 1.0 * * @return boolean */ public function register() { $propertyDefinitions = array(self::SBL_PARENTPAGE => array('label' => SBL_PROP_PARENTPAGE, 'type' => '_wpg', 'alias' => wfMessage('sbl-property-alias-parentpage')->text(), 'visbility' => true)); foreach ($propertyDefinitions as $propertyId => $definition) { DIProperty::registerProperty($propertyId, $definition['type'], $definition['label'], $definition['visbility']); DIProperty::registerPropertyAlias($propertyId, $definition['alias']); } return true; }
protected function registerPropertiesFromList(array $propertyList) { foreach ($propertyList as $externalId) { $propertyId = $this->getPropertyId($externalId); if ($propertyId === null) { continue; } DIProperty::registerProperty($propertyId, $this->getPropertyDataItemTypeId($externalId), $this->getPropertyLabel($externalId), $this->getPropertyVisibility($externalId)); DIProperty::registerPropertyAlias($propertyId, $this->getPropertyAlias($externalId)); } }
/** * Add a new alias label to an existing datatype id. Note that every ID should have a primary * label, either provided by SMW or registered with registerDatatype. This function should be * called from within the hook 'smwInitDatatypes'. * * @deprecated Use DIProperty::registerPropertyAlias(). Will vanish before SMW 1.7. */ public static function registerPropertyAlias($id, $label) { DIProperty::registerPropertyAlias($id, $label); }