| @@ 43-59 (lines=17) @@ | ||
| 40 | * @param PedigreeFields $parentObject |
|
| 41 | * @param $animalObject |
|
| 42 | */ |
|
| 43 | public function __construct($parentObject, $animalObject) |
|
| 44 | { |
|
| 45 | //@todo move language strings to language file |
|
| 46 | $this->fieldnumber = $parentObject->getId(); |
|
| 47 | $this->fieldname = $parentObject->fieldname; |
|
| 48 | $this->value = $animalObject->{'user' . $this->fieldnumber}; |
|
| 49 | $this->defaultvalue = $parentObject->defaultvalue; |
|
| 50 | if ($parentObject->hasLookup()) { |
|
| 51 | xoops_error('No lookuptable may be specified for userfield ' . $this->fieldnumber, get_class($this)); |
|
| 52 | } |
|
| 53 | if ($parentObject->inAdvanced()) { |
|
| 54 | xoops_error('userfield ' . $this->fieldnumber . ' cannot be shown in advanced info', get_class($this)); |
|
| 55 | } |
|
| 56 | if ($parentObject->inPie()) { |
|
| 57 | xoops_error('A Pie-chart cannot be specified for userfield ' . $this->fieldnumber, get_class($this)); |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * @return XoopsFormTextDateSelect |
|
| @@ 42-57 (lines=16) @@ | ||
| 39 | * @param Field $parentObject |
|
| 40 | * @param PedigreeAnimal $animalObject |
|
| 41 | */ |
|
| 42 | public function __construct($parentObject, $animalObject) |
|
| 43 | { |
|
| 44 | $this->fieldnumber = $parentObject->getId(); |
|
| 45 | $this->fieldname = $parentObject->fieldname; |
|
| 46 | $this->value = $animalObject->{'user' . $this->fieldnumber}; |
|
| 47 | $this->defaultvalue = $parentObject->defaultvalue; |
|
| 48 | if ($parentObject->hasLookup()) { |
|
| 49 | xoops_error('No lookuptable may be specified for userfield ' . $this->fieldnumber, get_class($this)); |
|
| 50 | } |
|
| 51 | if ($parentObject->inAdvanced()) { |
|
| 52 | xoops_error('userfield ' . $this->fieldnumber . ' cannot be shown in advanced info', get_class($this)); |
|
| 53 | } |
|
| 54 | if ($parentObject->inPie()) { |
|
| 55 | xoops_error('A Pie-chart cannot be specified for userfield ' . $this->fieldnumber, get_class($this)); |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| 59 | /** |
|
| 60 | * @return XoopsFormTextArea |
|
| @@ 42-58 (lines=17) @@ | ||
| 39 | * @param Field $parentObject |
|
| 40 | * @param PedigreeAnimal $animalObject |
|
| 41 | */ |
|
| 42 | public function __construct($parentObject, $animalObject) |
|
| 43 | { |
|
| 44 | $this->fieldnumber = $parentObject->getId(); |
|
| 45 | $this->fieldname = $parentObject->fieldname; |
|
| 46 | $this->value = $animalObject->{'user' . $this->fieldnumber}; |
|
| 47 | $this->defaultvalue = $parentObject->defaultvalue; |
|
| 48 | $this->lookuptable = $parentObject->hasLookup(); |
|
| 49 | if ($this->lookuptable) { |
|
| 50 | xoops_error('No lookuptable may be specified for userfield ' . $this->fieldnumber, get_class($this)); |
|
| 51 | } |
|
| 52 | if ($parentObject->inAdvanced()) { |
|
| 53 | xoops_error('userfield ' . $this->fieldnumber . ' cannot be shown in advanced info', get_class($this)); |
|
| 54 | } |
|
| 55 | if ($parentObject->inPie()) { |
|
| 56 | xoops_error('A Pie-chart cannot be specified for userfield ' . $this->fieldnumber, get_class($this)); |
|
| 57 | } |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @return XoopsFormText |
|