protected function addRecord($entity, array $action = [])
    {
        if ($entity instanceof $this->className) {
            if (false !== ($index = array_search($entity, array_column($this->records, 0), true))) {
                if (!in_array($this->records[$index], $action)) {
                    $this->records[$index][] = $action;
                }
            } else {
                $this->records[] = [$entity, $action];
            }
        }
    }