@@ -82,9 +82,15 @@ |
||
82 | 82 | public function can($member) { |
83 | 83 | } |
84 | 84 | |
85 | + /** |
|
86 | + * @param \Member $member |
|
87 | + */ |
|
85 | 88 | public function canEdit($member) { |
86 | 89 | } |
87 | 90 | |
91 | + /** |
|
92 | + * @param \Member $member |
|
93 | + */ |
|
88 | 94 | public function canDelete($member) { |
89 | 95 | } |
90 | 96 |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use SilverStripe\Filesystem\ImageManipulation; |
6 | 6 | use SilverStripe\Filesystem\Storage\AssetContainer; |
7 | 7 | use SilverStripe\Filesystem\Storage\AssetStore; |
8 | - |
|
9 | 8 | use Injector; |
10 | 9 | use AssetField; |
11 | 10 | use File; |
@@ -573,8 +573,8 @@ discard block |
||
573 | 573 | |
574 | 574 | /** |
575 | 575 | * Helper function to duplicate relations from one object to another |
576 | - * @param $sourceObject the source object to duplicate from |
|
577 | - * @param $destinationObject the destination object to populate with the duplicated relations |
|
576 | + * @param DataObject $sourceObject the source object to duplicate from |
|
577 | + * @param DataObject $destinationObject the destination object to populate with the duplicated relations |
|
578 | 578 | * @param $name the name of the relation to duplicate (e.g. members) |
579 | 579 | */ |
580 | 580 | private function duplicateRelations($sourceObject, $destinationObject, $name) { |
@@ -972,6 +972,7 @@ discard block |
||
972 | 972 | * @param $includeRelations Boolean Merge any existing relations (optional) |
973 | 973 | * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values. |
974 | 974 | * Only applicable with $priority='right'. (optional) |
975 | + * @param DataObject|null $rightObj |
|
975 | 976 | * @return Boolean |
976 | 977 | */ |
977 | 978 | public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) { |
@@ -2257,6 +2258,7 @@ discard block |
||
2257 | 2258 | * |
2258 | 2259 | * This is experimental, and is currently only a Postgres-specific enhancement. |
2259 | 2260 | * |
2261 | + * @param string $class |
|
2260 | 2262 | * @return array or false |
2261 | 2263 | */ |
2262 | 2264 | public function database_extensions($class){ |
@@ -3066,7 +3068,7 @@ discard block |
||
3066 | 3068 | * Traverses to a field referenced by relationships between data objects, returning the value |
3067 | 3069 | * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName) |
3068 | 3070 | * |
3069 | - * @param $fieldName string |
|
3071 | + * @param string $fieldName string |
|
3070 | 3072 | * @return string | null - will return null on a missing value |
3071 | 3073 | */ |
3072 | 3074 | public function relField($fieldName) { |
@@ -3135,7 +3137,7 @@ discard block |
||
3135 | 3137 | * @param string $callerClass The class of objects to be returned |
3136 | 3138 | * @param string|array $filter A filter to be inserted into the WHERE clause. |
3137 | 3139 | * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples. |
3138 | - * @param string|array $sort A sort expression to be inserted into the ORDER |
|
3140 | + * @param string $sort A sort expression to be inserted into the ORDER |
|
3139 | 3141 | * BY clause. If omitted, self::$default_sort will be used. |
3140 | 3142 | * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead. |
3141 | 3143 | * @param string|array $limit A limit expression to be inserted into the LIMIT clause. |
@@ -3345,6 +3347,7 @@ discard block |
||
3345 | 3347 | /** |
3346 | 3348 | * @see $sourceQueryParams |
3347 | 3349 | * @param array |
3350 | + * @param string $key |
|
3348 | 3351 | */ |
3349 | 3352 | public function setSourceQueryParam($key, $value) { |
3350 | 3353 | $this->sourceQueryParams[$key] = $value; |
@@ -3352,6 +3355,7 @@ discard block |
||
3352 | 3355 | |
3353 | 3356 | /** |
3354 | 3357 | * @see $sourceQueryParams |
3358 | + * @param string $key |
|
3355 | 3359 | * @return Mixed |
3356 | 3360 | */ |
3357 | 3361 | public function getSourceQueryParam($key) { |
@@ -2,10 +2,8 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace SilverStripe\Model; |
4 | 4 | |
5 | -use SilverStripe\Model\FieldType\DBPolymorphicForeignKey; |
|
6 | 5 | use SilverStripe\Model\FieldType\DBField; |
7 | 6 | use SilverStripe\Model\FieldType\DBDatetime; |
8 | -use SilverStripe\Model\FieldType\DBPrimaryKey; |
|
9 | 7 | use SilverStripe\Model\FieldType\DBComposite; |
10 | 8 | use SilverStripe\Model\FieldType\DBClassName; |
11 | 9 | use Object; |
@@ -14,7 +12,6 @@ discard block |
||
14 | 12 | use i18nEntityProvider; |
15 | 13 | use Config; |
16 | 14 | use FieldList; |
17 | - |
|
18 | 15 | use SQLSelect; |
19 | 16 | |
20 | 17 |
@@ -54,6 +54,7 @@ discard block |
||
54 | 54 | * Create a new DataQuery. |
55 | 55 | * |
56 | 56 | * @param String The name of the DataObject class that you wish to query |
57 | + * @param string $dataClass |
|
57 | 58 | */ |
58 | 59 | public function __construct($dataClass) { |
59 | 60 | $this->dataClass = $dataClass; |
@@ -176,7 +177,7 @@ discard block |
||
176 | 177 | /** |
177 | 178 | * Ensure that the query is ready to execute. |
178 | 179 | * |
179 | - * @param array|null $queriedColumns Any columns to filter the query by |
|
180 | + * @param string[] $queriedColumns Any columns to filter the query by |
|
180 | 181 | * @return SQLSelect The finalised sql query |
181 | 182 | */ |
182 | 183 | public function getFinalisedQuery($queriedColumns = null) { |
@@ -365,7 +366,7 @@ discard block |
||
365 | 366 | /** |
366 | 367 | * Execute the query and return the result as {@link SS_Query} object. |
367 | 368 | * |
368 | - * @return SS_Query |
|
369 | + * @return Connect\SS_Query |
|
369 | 370 | */ |
370 | 371 | public function execute() { |
371 | 372 | return $this->getFinalisedQuery()->execute(); |
@@ -651,7 +652,7 @@ discard block |
||
651 | 652 | * mappings to the query object state. This has to be called |
652 | 653 | * in any overloaded {@link SearchFilter->apply()} methods manually. |
653 | 654 | * |
654 | - * @param String|array $relation The array/dot-syntax relation to follow |
|
655 | + * @param string $relation The array/dot-syntax relation to follow |
|
655 | 656 | * @param bool $linearOnly Set to true to restrict to linear relations only. Set this |
656 | 657 | * if this relation will be used for sorting, and should not include duplicate rows. |
657 | 658 | * @return The model class of the related item |
@@ -927,6 +928,7 @@ discard block |
||
927 | 928 | |
928 | 929 | /** |
929 | 930 | * Set an arbitrary query parameter, that can be used by decorators to add additional meta-data to the query. |
931 | + * @param string $key |
|
930 | 932 | */ |
931 | 933 | public function getQueryParam($key) { |
932 | 934 | if(isset($this->queryParams[$key])) return $this->queryParams[$key]; |
@@ -959,6 +961,9 @@ discard block |
||
959 | 961 | */ |
960 | 962 | protected $whereQuery; |
961 | 963 | |
964 | + /** |
|
965 | + * @param string $connective |
|
966 | + */ |
|
962 | 967 | public function __construct(DataQuery $base, $connective) { |
963 | 968 | $this->dataClass = $base->dataClass; |
964 | 969 | $this->query = $base->query; |
@@ -968,6 +973,9 @@ discard block |
||
968 | 973 | $base->where($this); |
969 | 974 | } |
970 | 975 | |
976 | + /** |
|
977 | + * @param string $filter |
|
978 | + */ |
|
971 | 979 | public function where($filter) { |
972 | 980 | if($filter) { |
973 | 981 | $this->whereQuery->addWhere($filter); |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use SilverStripe\Filesystem\ImageManipulation; |
6 | 6 | use SilverStripe\Filesystem\Storage\AssetContainer; |
7 | 7 | use SilverStripe\Filesystem\Storage\AssetStore; |
8 | - |
|
9 | 8 | use Injector; |
10 | 9 | use AssetField; |
11 | 10 | use File; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * |
94 | 94 | * @param string $name An optional name given to a connection in the DB::setConn() call. If omitted, |
95 | 95 | * the default connection is returned. |
96 | - * @return DBSchemaManager |
|
96 | + * @return Connect\DBSchemaManager|null |
|
97 | 97 | */ |
98 | 98 | public static function get_schema($name = 'default') { |
99 | 99 | $connection = self::get_conn($name); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** |
104 | 104 | * Builds a sql query with the specified connection |
105 | 105 | * |
106 | - * @param SQLExpression $expression The expression object to build from |
|
106 | + * @param \SQLExpression $expression The expression object to build from |
|
107 | 107 | * @param array $parameters Out parameter for the resulting query parameters |
108 | 108 | * @param string $name An optional name given to a connection in the DB::setConn() call. If omitted, |
109 | 109 | * the default connection is returned. |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | * |
125 | 125 | * @param string $name An optional name given to a connection in the DB::setConn() call. If omitted, |
126 | 126 | * the default connection is returned. |
127 | - * @return DBConnector |
|
127 | + * @return Connect\DBConnector|null |
|
128 | 128 | */ |
129 | 129 | public static function get_connector($name = 'default') { |
130 | 130 | $connection = self::get_conn($name); |
@@ -227,9 +227,8 @@ discard block |
||
227 | 227 | * Given the database configuration, this method will create the correct |
228 | 228 | * subclass of {@link SS_Database}. |
229 | 229 | * |
230 | - * @param array $database A map of options. The 'type' is the name of the subclass of SS_Database to use. For the |
|
230 | + * @param array $databaseConfig A map of options. The 'type' is the name of the subclass of SS_Database to use. For the |
|
231 | 231 | * rest of the options, see the specific class. |
232 | - * @param string $name identifier for the connection |
|
233 | 232 | * |
234 | 233 | * @return SS_Database |
235 | 234 | */ |
@@ -278,7 +277,7 @@ discard block |
||
278 | 277 | * Execute the given SQL query. |
279 | 278 | * @param string $sql The SQL query to execute |
280 | 279 | * @param int $errorLevel The level of error reporting to enable for the query |
281 | - * @return SS_Query |
|
280 | + * @return Connect\SS_Query |
|
282 | 281 | */ |
283 | 282 | public static function query($sql, $errorLevel = E_USER_ERROR) { |
284 | 283 | self::$lastQuery = $sql; |
@@ -313,7 +312,7 @@ discard block |
||
313 | 312 | * @param string $sql The SQL query to execute. The ? character will denote parameters. |
314 | 313 | * @param array $parameters An ordered list of arguments. |
315 | 314 | * @param int $errorLevel The level of error reporting to enable for the query |
316 | - * @return SS_Query |
|
315 | + * @return Connect\SS_Query |
|
317 | 316 | */ |
318 | 317 | public static function prepared_query($sql, $parameters, $errorLevel = E_USER_ERROR) { |
319 | 318 | self::$lastQuery = $sql; |
@@ -423,7 +422,7 @@ discard block |
||
423 | 422 | |
424 | 423 | /** |
425 | 424 | * Create a new table. |
426 | - * @param string $tableName The name of the table |
|
425 | + * @param string $table The name of the table |
|
427 | 426 | * @param array$fields A map of field names to field types |
428 | 427 | * @param array $indexes A map of indexes |
429 | 428 | * @param array $options An map of additional options. The available keys are as follows: |
@@ -510,6 +509,8 @@ discard block |
||
510 | 509 | |
511 | 510 | /** |
512 | 511 | * @deprecated since version 4.0 Use DB::require_field instead |
512 | + * @param string $table |
|
513 | + * @param string $field |
|
513 | 514 | */ |
514 | 515 | public static function requireField($table, $field, $spec) { |
515 | 516 | Deprecation::notice('4.0', 'Use DB::require_field instead'); |
@@ -573,7 +574,7 @@ discard block |
||
573 | 574 | /** |
574 | 575 | * Checks a table's integrity and repairs it if necessary. |
575 | 576 | * |
576 | - * @param string $tableName The name of the table. |
|
577 | + * @param string $table The name of the table. |
|
577 | 578 | * @return boolean Return true if the table has integrity after the method is complete. |
578 | 579 | */ |
579 | 580 | public static function check_and_repair_table($table) { |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use SilverStripe\Filesystem\ImageManipulation; |
6 | 6 | use SilverStripe\Filesystem\Storage\AssetContainer; |
7 | 7 | use SilverStripe\Filesystem\Storage\AssetStore; |
8 | - |
|
9 | 8 | use Injector; |
10 | 9 | use AssetField; |
11 | 10 | use File; |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use SilverStripe\Filesystem\ImageManipulation; |
6 | 6 | use SilverStripe\Filesystem\Storage\AssetContainer; |
7 | 7 | use SilverStripe\Filesystem\Storage\AssetStore; |
8 | - |
|
9 | 8 | use Injector; |
10 | 9 | use AssetField; |
11 | 10 | use File; |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use SilverStripe\Filesystem\ImageManipulation; |
6 | 6 | use SilverStripe\Filesystem\Storage\AssetContainer; |
7 | 7 | use SilverStripe\Filesystem\Storage\AssetStore; |
8 | - |
|
9 | 8 | use Injector; |
10 | 9 | use AssetField; |
11 | 10 | use File; |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | -use ClassInfo; |
|
8 | 7 | use SilverStripe\Model\DataObject; |
9 | 8 | |
10 | 9 |
@@ -3,9 +3,6 @@ |
||
3 | 3 | namespace SilverStripe\Model\FieldType; |
4 | 4 | |
5 | 5 | |
6 | -use DropdownField; |
|
7 | - |
|
8 | - |
|
9 | 6 | use SilverStripe\Model\DB; |
10 | 7 | use SilverStripe\Model\DataObject; |
11 | 8 |