fix(process): 修复自定义配置 required 不生效
This commit is contained in:
@@ -138,6 +138,14 @@ abstract class AbstractProcessNode implements ProcessNodeInterface
|
||||
return (!empty($this->getConfig()->required)) ? $this->getConfig()->required : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子节点数量
|
||||
*/
|
||||
public function getChildNodeCount(): int
|
||||
{
|
||||
return count($this->getChildNodes());
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是需要的前置节点
|
||||
* @param string $currentStep
|
||||
@@ -174,14 +182,14 @@ abstract class AbstractProcessNode implements ProcessNodeInterface
|
||||
protected function stopNext(ProcessContext $context): ProcessContext
|
||||
{
|
||||
return $context->builder()
|
||||
->skipNodeCount(count($this->getRemainingNodes()))
|
||||
->skipNodeCount(count($this->getChildNodes()))
|
||||
->build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取剩余节点
|
||||
*/
|
||||
protected function getRemainingNodes(): array
|
||||
public function getChildNodes(): array
|
||||
{
|
||||
$remainingNodes = [];
|
||||
$node = $this->next;
|
||||
|
||||
Reference in New Issue
Block a user