Beispiel #1
0
 function getDefault()
 {
     $default = parent::getDefault();
     if ($default instanceof Closure) {
         $default = call_user_func($default, $this->mParams);
     }
     return $default;
 }
 public function getDefault()
 {
     $ret = parent::getDefault();
     // The default default is one entry with all subfields at their
     // defaults.
     if ($ret === null) {
         $fields = $this->createFieldsForKey($this->uniqueId);
         $row = [];
         foreach ($fields as $fieldname => $field) {
             if (!empty($field->mParams['nodata'])) {
                 continue;
             } else {
                 $row[$fieldname] = $field->getDefault();
             }
         }
         $ret = [$row];
     }
     return $ret;
 }