protected function _move(Table $table, $id, $step = 1, $type = self::TYPE_UP)
    {
        $behaviors = $table->behaviors();
        if (!Arr::in('Tree', $behaviors->loaded())) {
            $behaviors->load('Tree');
        }

        $entity = $table->get($id);

        /** @var TreeBehavior $treeBehavior */
        $treeBehavior = $behaviors->get('Tree');
        $treeBehavior->setConfig('scope', $entity->get('id'));

        if ($table->{$type}($entity, $step)) {
            $this->Flash->success($this->_configRead('messages.success'));
        } else {
            $this->Flash->error($this->_configRead('messages.error'));
        }

        return $this->_redirect();
    }