本文整理汇总了PHP中Drupal\Core\Field\FormatterBase::settingsSummary方法的典型用法代码示例。如果您正苦于以下问题:PHP FormatterBase::settingsSummary方法的具体用法?PHP FormatterBase::settingsSummary怎么用?PHP FormatterBase::settingsSummary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Core\Field\FormatterBase
的用法示例。
在下文中一共展示了FormatterBase::settingsSummary方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: settingsSummary
/**
* {@inheritdoc}
*/
public function settingsSummary()
{
$summary = parent::settingsSummary();
$format = $this->getSetting('flag_display');
$formats = $this->getOutputFormats();
$summary[] = $formats[$format];
return $summary;
}
示例2: settingsSummary
/**
* {@inheritdoc}
*/
public function settingsSummary()
{
$summary = parent::settingsSummary();
if ($override = $this->getSetting('timezone_override')) {
$summary[] = $this->t('Time zone: @timezone', array('@timezone' => $override));
}
return $summary;
}
示例3: settingsSummary
/**
* {@inheritdoc}
*/
public function settingsSummary()
{
$summary = parent::settingsSummary();
$future_date = strtotime('1 year 1 month 1 week 1 day 1 hour 1 minute');
$past_date = strtotime('-1 year -1 month -1 week -1 day -1 hour -1 minute');
$summary[] = $this->t('Future date: %display', array('%display' => $this->formatTimestamp($future_date)));
$summary[] = $this->t('Past date: %display', array('%display' => $this->formatTimestamp($past_date)));
return $summary;
}
示例4: settingsSummary
/**
* {@inheritdoc}
*/
public function settingsSummary()
{
$summary = parent::settingsSummary();
$date_format = $this->getSetting('date_format');
$summary[] = $this->t('Date format: @date_format', array('@date_format' => $date_format));
if ($this->getSetting('date_format') === 'custom' && ($custom_date_format = $this->getSetting('custom_date_format'))) {
$summary[] = $this->t('Custom date format: @custom_date_format', array('@custom_date_format' => $custom_date_format));
}
if ($timezone = $this->getSetting('timezone')) {
$summary[] = $this->t('Time zone: @timezone', array('@timezone' => $timezone));
}
return $summary;
}