* Add workflow fields to formpanel.
This commit is contained in:
@@ -488,6 +488,28 @@ class control extends baseControl
|
||||
echo $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* append workflow fields to form.
|
||||
*
|
||||
* @param zin\fieldList $fields
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function appendExtendFields(zin\fieldList $fields, string $moduleName = '', string $methodName = '')
|
||||
{
|
||||
if($this->config->edition == 'open') return false;
|
||||
|
||||
$moduleName = $moduleName ?: $this->app->getModuleName();
|
||||
$methodName = $methodName ?: $this->app->getMethodName();
|
||||
|
||||
$flow = $this->loadModel('workflow')->getByModule($moduleName);
|
||||
$action = $this->loadModel('workflowaction')->getByModuleAndAction($flow->module, $methodName);
|
||||
$fieldList = $this->workflowaction->getFields($flow->module, $action->action);
|
||||
return $this->loadModel('flow')->buildFormFields($fields, $fieldList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process status of an object according to its subStatus.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user