diff --git a/src/app/Library/CrudPanel/CrudObjectGroup.php b/src/app/Library/CrudPanel/CrudObjectGroup.php new file mode 100644 index 0000000000..a9421db8ba --- /dev/null +++ b/src/app/Library/CrudPanel/CrudObjectGroup.php @@ -0,0 +1,46 @@ +objects = $objects; + } + + // ------------- + // MAGIC METHODS + // ------------- + + /** + * We foward any call to the corresponding class passed by developer (Field, Columns, Filters etc ..). + * + * @param string $method The method being called that doesn't exist. + * @param array $parameters The arguments when that method was called. + * + * @return CrudObjectGroup + */ + public function __call($method, $parameter) + { + foreach ($this->objects as $object) { + $object->{$method}($parameter[0]); + } + + return $this; + } +}