Пример #1
0
 public function setUp()
 {
     $this->collection = new Keywords();
     foreach ($this->keywords as $keyword) {
         $object = $this->hydrate(new Keyword(), $keyword);
         $this->collection->addKeyword($object);
     }
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function createCollection(array $data = [])
 {
     $collection = new Keywords();
     if (array_key_exists('keywords', $data)) {
         $data = $data['keywords'];
     }
     foreach ($data as $item) {
         $collection->addKeyword($this->create($item));
     }
     return $collection;
 }