src/Utility/Validate/Check/ConfigCheck.php
protected function checkParent(string $module, array $options = [], array $config = []) : void
    {
        if (empty($config['parent'])) {
            return;
        }

        if (!empty($config['parent']['redirect'])) {
            //if redirect = parent, we force the user to mention the relation and module
            if (in_array($config['parent']['redirect'], ['parent'])) {
                if (empty($config['parent']['module'])) {
                    $this->errors[] = $module . " config [parent] requires 'module' value when redirect = parent.";
                }

                if (empty($config['parent']['relation'])) {
                    $this->errors[] = $module . " config [parent] requires 'relation' when redirect = parent.";
                }
            }
        }
    }
protected function checkParent(string $module, array $options = [], array $config = []) : void
    {
        if (empty($config['parent'])) {
            return;
        }

        if (!empty($config['parent']['redirect'])) {
            //if redirect = parent, we force the user to mention the relation and module
            if (in_array($config['parent']['redirect'], ['parent'])) {
                if (empty($config['parent']['module'])) {
                    $this->errors[] = $module . " config [parent] requires 'module' value when redirect = parent.";
                }

                if (empty($config['parent']['relation'])) {
                    $this->errors[] = $module . " config [parent] requires 'relation' when redirect = parent.";
                }
            }
        }
    }
protected function checkParent ( string $ module , array $ options = [ ] , array $ config = [ ] ) : void { if ( empty ( $ config [ 'parent' ] ) ) { return ; } if ( ! empty ( $ config [ 'parent' ] [ 'redirect' ] ) ) { //if redirect = parent, we force the user to mention the relation and module if ( in_array ( $ config [ 'parent' ] [ 'redirect' ] , [ 'parent' ] ) ) { if ( empty ( $ config [ 'parent' ] [ 'module' ] ) ) { $ this -> errors [ ] = $ module . " config [parent] requires 'module' value when redirect = parent." ; } if ( empty ( $ config [ 'parent' ] [ 'relation' ] ) ) { $ this -> errors [ ] = $ module . " config [parent] requires 'relation' when redirect = parent." ; } } } }
Check parent section of the configuration

@param string $module Module name
@param mixed[] $options Check options
@param mixed[] $config Configuration
@return void
Check parent section of the configuration