createSeries() 공개 메소드

Inserts a new series, and the subsequent items, in the database
public createSeries ( array $post ) : boolean
$post array
리턴 boolean
예제 #1
0
파일: Blog.php 프로젝트: paragonie/airship
 /**
  * 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);
 }