本文整理汇总了PHP中ListboxField::setDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP ListboxField::setDescription方法的具体用法?PHP ListboxField::setDescription怎么用?PHP ListboxField::setDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListboxField
的用法示例。
在下文中一共展示了ListboxField::setDescription方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateCMSFields
public function updateCMSFields(FieldList $fields)
{
$services = SiteConfig::config()->available_services;
if (!$services) {
$services = array_keys(self::listAvailableMediaServices());
}
if (in_array('twitter', $services)) {
$fields->addFieldToTab('Root.Social', new TextField('TwitterUsername', _t('Socialstream.TwitterUsername', 'Twitter Username')));
}
if (in_array('twitter_hashtag', $services)) {
$fields->addFieldToTab('Root.Social', new TextField('TwitterHashtag', _t('Socialstream.TwitterHashtag', 'Twitter Hashtag')));
}
if (in_array('facebook_page', $services)) {
$fields->addFieldToTab('Root.Social', new TextField('FacebookPage', _t('Socialstream.FacebookPage', 'Facebook Page')));
}
if (in_array('vimeo', $services)) {
$fields->addFieldToTab('Root.Social', new TextField('VimeoUsername', _t('Socialstream.VimeoUsername', 'Vimeo Username')));
}
if (in_array('youtube', $services)) {
$fields->addFieldToTab('Root.Social', new TextField('YoutubeUsername', _t('Socialstream.YoutubeUsername', 'Youtube Username')));
}
if (in_array('dailymotion', $services)) {
$fields->addFieldToTab('Root.Social', new TextField('DailymotionUsername', _t('Socialstream.DailymotionUsername', 'Dailymotion Username')));
}
if (in_array('rss', $services)) {
$fields->addFieldToTab('Root.Social', new TextField('RssFeed', _t('Socialstream.RssFeed', 'Rss Feed')));
}
if (in_array('flickr', $services)) {
$fields->addFieldToTab('Root.Social', new TextField('FlickrUsername', _t('Socialstream.FlickrUsername', 'Flickr Username')));
}
if (in_array('github', $services)) {
$fields->addFieldToTab('Root.Social', new TextField('GithubUsername', _t('Socialstream.GithubUsername', 'Github Username')));
}
$fields->addFieldToTab('Root.Social', $wl = new ListboxField('LifestreamWhitelist', _t('Socialstream.LifestreamWhitelist', 'Lifestream Whitelist'), array_combine($services, $services)));
$wl->setMultiple(true);
$wl->setDescription('A list of services to display on the Lifestream. If left blank, all configured streams will be used.');
$fields->addFieldToTab('Root.Social', new NumericField('LifestreamItems', _t('Socialstream.LifestreamItems', 'Lifestream Items')));
return $fields;
}