From 3181af1046b91c2e040c472c1e2d4e8a41c1b87c Mon Sep 17 00:00:00 2001 From: Pedro X Date: Tue, 23 Jun 2020 15:45:26 +0100 Subject: [PATCH] add file --- src/app/Library/CrudPanel/CrudObjectGroup.php | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/app/Library/CrudPanel/CrudObjectGroup.php 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; + } +}