public function save(ResourceInterface $resource): bool
    {
        if (!$this->savesResource($resource->getType())) {
            return false;
        }

        $key = $this->generateKey(
            $resource->getType(),
            $resource->getId(),
            ['locale' => $this->getResourceLocale($resource)]
        );

        $exists = isset($this->resources[$key]);
        $this->resources[$key] = $resource;

        return !$exists;
    }
public function save(ResourceInterface $resource): bool
    {
        if (!$this->savesResource($resource->getType())) {
            return false;
        }

        $key = $this->generateKey(
            $resource->getType(),
            $resource->getId(),
            ['locale' => $this->getResourceLocale($resource)]
        );

        $exists = isset($this->resources[$key]);
        $this->resources[$key] = $resource;

        return !$exists;
    }
public function save ( ResourceInterface $ resource ) : bool { if ( ! $ this -> savesResource ( $ resource -> getType ( ) ) ) { return false ; } $ key = $ this -> generateKey ( $ resource -> getType ( ) , $ resource -> getId ( ) , [ 'locale' => $ this -> getResourceLocale ( $ resource ) ] ) ; $ exists = isset ( $ this -> resources [ $ key ] ) ; $ this -> resources [ $ key ] = $ resource ; return ! $ exists ; }
{@inheritdoc}
{