createSeries() public method

Inserts a new series, and the subsequent items, in the database
public createSeries ( array $post ) : boolean
$post array
return boolean
Example #1
0
 /**
  * Create a new series
  *
  * @param array $post
  * @param array $authorsAllowed
  * @return bool
  */
 protected function processNewSeries(array $post = [], array $authorsAllowed = []) : bool
 {
     if (!\Airship\all_keys_exist(['author', 'items'], $post)) {
         return false;
     }
     if (!\in_array($post['author'], $authorsAllowed)) {
         return false;
     }
     return $this->blog->createSeries($post);
 }