You are here

protected function SyncCoreEntityListResource::returnError in CMS Content Sync 2.0.x

Same name and namespace in other branches
  1. 2.1.x src/Plugin/rest/resource/SyncCoreEntityListResource.php \Drupal\cms_content_sync\Plugin\rest\resource\SyncCoreEntityListResource::returnError()
1 call to SyncCoreEntityListResource::returnError()
SyncCoreEntityListResource::get in src/Plugin/rest/resource/SyncCoreEntityListResource.php

File

src/Plugin/rest/resource/SyncCoreEntityListResource.php, line 297

Class

SyncCoreEntityListResource
Provides entity interfaces for Content Sync, allowing Sync Core v2 to list entities.

Namespace

Drupal\cms_content_sync\Plugin\rest\resource

Code

protected function returnError($message, $code = self::CODE_BAD_REQUEST) {
  \Drupal::logger('cms_content_sync')
    ->notice('@not LIST: @message', [
    '@not' => 'NO',
    '@message' => $message,
  ]);
  return $this
    ->respondWith([
    'message' => $message,
  ], $code);
}