Skip to content

Commit e8302c0

Browse files
committed
Allow passing arguments to <options> methods
1 parent a986580 commit e8302c0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/app/code/community/FireGento/GridControl/Model/Processor.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,15 @@ protected function _addAction($params)
110110
if (strpos((string) $attribute, '::') !== false) {
111111
list($_module, $_method) = explode('::', (string) $attribute);
112112
$_module = Mage::getSingleton($_module);
113+
if ($_args = strstr($_method, '(')) {
114+
$_method = str_replace($_args, '', $_method);
115+
$_args = array_map('trim', explode(',', str_replace(array('(', ')', '\'', '"'), '', $_args)));
116+
} else {
117+
$_args = array();
118+
}
113119
$_call = array($_module, $_method);
114120
if (is_callable($_call)) {
115-
$columnConfig['options'] = call_user_func($_call);
121+
$columnConfig['options'] = call_user_func($_call, $_args);
116122
continue;
117123
}
118124
}

0 commit comments

Comments
 (0)