mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API Deprecated Object::add_extension() usage (as of 3.2)
This commit is contained in:
parent
1cfc159f1a
commit
14b997eea3
@ -446,11 +446,18 @@ abstract class Object {
|
||||
* Keep in mind that the extension will only be applied to new
|
||||
* instances, not existing ones (including all instances created through {@link singleton()}).
|
||||
*
|
||||
* @deprecated 3.2 Use YAML config instead, see
|
||||
* http://doc.silverstripe.org/framework/en/trunk/reference/dataextension
|
||||
* @param string $class Class that should be extended - has to be a subclass of {@link Object}
|
||||
* @param string $extension Subclass of {@link Extension} with optional parameters
|
||||
* as a string, e.g. "Versioned" or "Translatable('Param')"
|
||||
*/
|
||||
public static function add_extension($classOrExtension, $extension = null) {
|
||||
Deprecation::notice(
|
||||
'3.2',
|
||||
'Use YAML config instead, see http://doc.silverstripe.org/framework/en/trunk/reference/dataextension'
|
||||
);
|
||||
|
||||
if(func_num_args() > 1) {
|
||||
$class = $classOrExtension;
|
||||
} else {
|
||||
|
@ -450,3 +450,4 @@ you can enable those warnings and future-proof your code already.
|
||||
* Hard limit displayed pages in the CMS tree to `500`, and the number of direct children to `250`,
|
||||
to avoid excessive resource usage. Configure through `Hierarchy.node_threshold_total` and `
|
||||
Hierarchy.node_threshold_leaf`. Set to `0` to show tree unrestricted.
|
||||
* Deprecated `Object::add_extension()`, use YAML config instead, see [docs](http://doc.silverstripe.org/framework/en/trunk/reference/dataextension)
|
Loading…
x
Reference in New Issue
Block a user