예제 #1
0
파일: Date.php 프로젝트: 318io/318-io
 protected function defineOptions()
 {
     $options = parent::defineOptions();
     // value is already set up properly, we're just adding our new field to it.
     $options['value']['contains']['type']['default'] = 'date';
     return $options;
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function defaultExposeOptions()
 {
     parent::defineOptions();
     $this->options['expose']['label'] = $this->t('Distance (in @units)', ['@units' => $this->value['units'] === 'km' ? 'kilometers' : 'miles']);
 }