@@ -36,6 +36,10 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | protected $fieldCurrency = null; |
| 38 | 38 | |
| 39 | + /** |
|
| 40 | + * @param string $name |
|
| 41 | + * @param string $title |
|
| 42 | + */ |
|
| 39 | 43 | public function __construct($name, $title = null, $value = "") { |
| 40 | 44 | // naming with underscores to prevent values from actually being saved somewhere |
| 41 | 45 | $this->fieldAmount = new NumericField("{$name}[Amount]", _t('MoneyField.FIELDLABELAMOUNT', 'Amount')); |
@@ -46,7 +50,7 @@ discard block |
||
| 46 | 50 | |
| 47 | 51 | /** |
| 48 | 52 | * @param array |
| 49 | - * @return HTMLText |
|
| 53 | + * @return DBField |
|
| 50 | 54 | */ |
| 51 | 55 | public function Field($properties = array()) { |
| 52 | 56 | return DBField::create_field('HTMLText', |
@@ -139,6 +143,7 @@ discard block |
||
| 139 | 143 | /** |
| 140 | 144 | * @todo Implement removal of readonly state with $bool=false |
| 141 | 145 | * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies() |
| 146 | + * @param boolean $bool |
|
| 142 | 147 | */ |
| 143 | 148 | public function setReadonly($bool) { |
| 144 | 149 | parent::setReadonly($bool); |
@@ -179,6 +184,9 @@ discard block |
||
| 179 | 184 | return $this->allowedCurrencies; |
| 180 | 185 | } |
| 181 | 186 | |
| 187 | + /** |
|
| 188 | + * @param string $locale |
|
| 189 | + */ |
|
| 182 | 190 | public function setLocale($locale) { |
| 183 | 191 | $this->_locale = $locale; |
| 184 | 192 | return $this; |
@@ -217,9 +217,8 @@ discard block |
||
| 217 | 217 | * Given the database configuration, this method will create the correct |
| 218 | 218 | * subclass of {@link SS_Database}. |
| 219 | 219 | * |
| 220 | - * @param array $database A map of options. The 'type' is the name of the subclass of SS_Database to use. For the |
|
| 220 | + * @param array $databaseConfig A map of options. The 'type' is the name of the subclass of SS_Database to use. For the |
|
| 221 | 221 | * rest of the options, see the specific class. |
| 222 | - * @param string $name identifier for the connection |
|
| 223 | 222 | * |
| 224 | 223 | * @return SS_Database |
| 225 | 224 | */ |
@@ -413,7 +412,7 @@ discard block |
||
| 413 | 412 | |
| 414 | 413 | /** |
| 415 | 414 | * Create a new table. |
| 416 | - * @param string $tableName The name of the table |
|
| 415 | + * @param string $table The name of the table |
|
| 417 | 416 | * @param array$fields A map of field names to field types |
| 418 | 417 | * @param array $indexes A map of indexes |
| 419 | 418 | * @param array $options An map of additional options. The available keys are as follows: |
@@ -500,6 +499,8 @@ discard block |
||
| 500 | 499 | |
| 501 | 500 | /** |
| 502 | 501 | * @deprecated since version 4.0 Use DB::require_field instead |
| 502 | + * @param string $table |
|
| 503 | + * @param string $field |
|
| 503 | 504 | */ |
| 504 | 505 | public static function requireField($table, $field, $spec) { |
| 505 | 506 | Deprecation::notice('4.0', 'Use DB::require_field instead'); |
@@ -563,7 +564,7 @@ discard block |
||
| 563 | 564 | /** |
| 564 | 565 | * Checks a table's integrity and repairs it if necessary. |
| 565 | 566 | * |
| 566 | - * @param string $tableName The name of the table. |
|
| 567 | + * @param string $table The name of the table. |
|
| 567 | 568 | * @return boolean Return true if the table has integrity after the method is complete. |
| 568 | 569 | */ |
| 569 | 570 | public static function check_and_repair_table($table) { |
@@ -186,6 +186,9 @@ |
||
| 186 | 186 | return $classNames; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | + /** |
|
| 190 | + * @param \DBClassNameTest_ObjectSubClass $record |
|
| 191 | + */ |
|
| 189 | 192 | public function setValue($value, $record = null, $markChanged = true) { |
| 190 | 193 | parent::setValue($value, $record, $markChanged); |
| 191 | 194 | |
@@ -2,9 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\Model\FieldType; |
| 4 | 4 | |
| 5 | -use DB; |
|
| 6 | 5 | use DataObject; |
| 7 | -use ClassInfo; |
|
| 8 | 6 | |
| 9 | 7 | /** |
| 10 | 8 | * A special ForeignKey class that handles relations with arbitrary class types |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\Model\FieldType; |
| 4 | 4 | |
| 5 | -use DataList; |
|
| 6 | -use DropdownField; |
|
| 7 | 5 | use DB; |
| 8 | 6 | use DataObject; |
| 9 | 7 | |