示例#1
0
 protected function getDetails(RecordInterface $element)
 {
     if ($element instanceof Form\Element\Action) {
         return '';
     } elseif ($element instanceof Form\Element\Connection) {
         return '';
     } elseif ($element instanceof Form\Element\Input) {
         return $element->getType();
     } elseif ($element instanceof Form\Element\Select) {
         $options = [];
         foreach ($element->getOptions() as $option) {
             $options[] = $option['key'] . ': ' . $option['value'];
         }
         return implode(', ', $options);
     } elseif ($element instanceof Form\Element\TextArea) {
         return $element->getMode();
     } else {
         return '';
     }
 }