You are here

public function BlogapiCommunicator::validateBlogId in Blog API 8

Check if the node is manageable with BlogAPI.

Parameters

$ct: Content type machine name.

Return value

bool Returns the validation result.

4 calls to BlogapiCommunicator::validateBlogId()
BlogapiCommunicator::getCategoryList in src/BlogapiCommunicator.php
Returns a list of available categories on a content type.
BlogapiCommunicator::getRecentPosts in src/BlogapiCommunicator.php
Method that returns recent posts.
BlogapiCommunicator::newMedia in src/BlogapiCommunicator.php
Callback for uploading a new image.
BlogapiCommunicator::newPost in src/BlogapiCommunicator.php
Callback for creating a new node.

File

src/BlogapiCommunicator.php, line 109

Class

BlogapiCommunicator
Class BlogapiCommunicator.

Namespace

Drupal\blogapi

Code

public function validateBlogId($ct) {
  $content_types = $this->blogapiConfig
    ->get('content_types');
  if (in_array($ct, $content_types)) {
    return TRUE;
  }
  return FALSE;
}