本文整理汇总了PHP中SMWDIProperty::m_prop_labels方法的典型用法代码示例。如果您正苦于以下问题:PHP SMWDIProperty::m_prop_labels方法的具体用法?PHP SMWDIProperty::m_prop_labels怎么用?PHP SMWDIProperty::m_prop_labels使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMWDIProperty
的用法示例。
在下文中一共展示了SMWDIProperty::m_prop_labels方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initPropertyRegistration
/**
* Set up predefined properties, including their label, aliases, and
* typing information.
*/
protected static function initPropertyRegistration()
{
if (is_array(SMWDIProperty::$m_prop_types)) {
return;
// init happened before
}
global $smwgContLang, $smwgUseCategoryHierarchy;
$datatypeLabels = $smwgContLang->getDatatypeLabels();
SMWDIProperty::$m_prop_labels = $smwgContLang->getPropertyLabels() + $datatypeLabels;
SMWDIProperty::$m_prop_aliases = $smwgContLang->getPropertyAliases() + $smwgContLang->getDatatypeAliases();
// Setup built-in predefined properties.
// NOTE: all ids must start with underscores. The translation
// for each ID, if any, is defined in the language files.
// Properties without translation cannot be entered by or
// displayed to users, whatever their "show" value below.
SMWDIProperty::$m_prop_types = array('_TYPE' => array('__typ', true), '_URI' => array('__spu', true), '_INST' => array('__sin', false), '_UNIT' => array('__sps', true), '_IMPO' => array('__imp', true), '_CONV' => array('__sps', true), '_SERV' => array('__sps', true), '_PVAL' => array('__sps', true), '_REDI' => array('__red', true), '_SUBP' => array('__sup', true), '_SUBC' => array('__suc', !$smwgUseCategoryHierarchy), '_CONC' => array('__con', false), '_MDAT' => array('_dat', false), '_CDAT' => array('_dat', false), '_NEWP' => array('_boo', false), '_LEDT' => array('_wpg', false), '_ERRP' => array('_wpp', false), '_LIST' => array('__pls', true), '_SKEY' => array('__key', false), '_SF_DF' => array('__spf', true), '_SF_AF' => array('__spf', true), '_SOBJ' => array('_wpg', true), '_ASK' => array('_wpg', false), '_ASKST' => array('_cod', true), '_ASKFO' => array('_str', true), '_ASKSI' => array('_num', true), '_ASKDE' => array('_num', true));
foreach ($datatypeLabels as $typeid => $label) {
SMWDIProperty::$m_prop_types[$typeid] = array($typeid, true);
}
wfRunHooks('smwInitProperties');
}
示例2: initPropertyRegistration
/**
* Set up predefined properties, including their label, aliases, and
* typing information.
*/
static protected function initPropertyRegistration() {
if ( is_array( SMWDIProperty::$m_prop_types ) ) {
return; // init happened before
}
global $smwgContLang, $smwgUseCategoryHierarchy;
$datatypeLabels = $smwgContLang->getDatatypeLabels();
SMWDIProperty::$m_prop_labels = $smwgContLang->getPropertyLabels() + $datatypeLabels;
SMWDIProperty::$m_prop_aliases = $smwgContLang->getPropertyAliases() + $smwgContLang->getDatatypeAliases();
// Setup built-in predefined properties.
// NOTE: all ids must start with underscores. The translation
// for each ID, if any, is defined in the language files.
// Properties without translation cannot be entered by or
// displayed to users, whatever their "show" value below.
SMWDIProperty::$m_prop_types = array(
'_TYPE' => array( '__typ', true ), // "has type"
'_URI' => array( '__spu', true ), // "equivalent URI"
'_INST' => array( '__sin', false ), // instance of a category
'_UNIT' => array( '__sps', true ), // "displays unit"
'_IMPO' => array( '__imp', true ), // "imported from"
'_CONV' => array( '__sps', true ), // "corresponds to"
'_SERV' => array( '__sps', true ), // "provides service"
'_PVAL' => array( '__sps', true ), // "allows value"
'_REDI' => array( '__red', true ), // redirects to some page
'_SUBP' => array( '__sup', true ), // "subproperty of"
'_SUBC' => array( '__suc', !$smwgUseCategoryHierarchy ), // "subcategory of"
'_CONC' => array( '__con', false ), // associated concept
'_MDAT' => array( '_dat', false ), // "modification date"
'_CDAT' => array( '_dat', false ), // "creation date"
'_ERRP' => array( '_wpp', false ), // "has improper value for"
'_LIST' => array( '__pls', true ), // "has fields"
'_SKEY' => array( '__key', false ), // sort key of a page
'_SF_DF' => array( '__spf', true ), // Semantic Form's default form property
'_SF_AF' => array( '__spf', true ), // Semantic Form's alternate form property
'_SOBJ' => array( '_wpg', true ), // "has subobject"
);
foreach ( $datatypeLabels as $typeid => $label ) {
SMWDIProperty::$m_prop_types[$typeid] = array( $typeid, true );
}
wfRunHooks( 'smwInitProperties' );
}