*
Set comments

@param  ArrayCollection $comments

@return Post
426587
public function setComments(ArrayCollection $comments)
    {
        /** @var \Icap\BlogBundle\Entity\Comment[] $comments */
        foreach ($comments as $comment) {
            $comment->setPost($this);
        }

        $this->comments = $comments;

        return $this;
    }
425223
public function setComment( $comment )
	{
		if ( $comment == $this->getComment() ) { return; }

		$this->_values['comment'] = (string) $comment;

		$this->_modified = true;
	}
1075039
public function setCheckboxes(array $checkboxes)
    {
        foreach ($checkboxes as $name => $label) {
            $this->checkboxes[$label] = new Checkbox($name);
        }

        return $this;
    }
1290230
public function inArray($array, $comment = "")
	{
		if ($this->isValid)
		{
			$res = array_intersect($array, array($this->val));
			if (!$res)
				self::addMessage($comment);
		}
		return $this;
	}
886630
public function dispatchCommentOnAddEvent(CommentInterface $comment)
    {
        $event = new CommentOnAddEvent(
            $comment
        );

        $this
            ->eventDispatcher
            ->dispatch(ElcodiCommentEvents::COMMENT_ONADD, $event);

        return $this;
    }
163051
public function setComments($comments)
    {
        if (is_array($comments)) {
            $comments = implode($comments, ' ');
        }

        $this->comments = $comments;

        return $this;
    }
106301
public function add($comment)
    {
        if (is_array($comment)) {
            $this->collection[] = new Comment($comment);
        } elseif (is_object($comment) && $comment instanceof Comment) {
            $this->collection[] = $comment;
        }

        return $this;
    }
1084355
public function addComment(\Innova\CollecticielBundle\Entity\CommentRead $comments)
    {
        $this->comments[] = $comments;

        return $this;
    }
397008
public function setPosts(ArrayCollection $posts)
    {
        /** @var \Icap\BlogBundle\Entity\Post[] $posts */
        foreach ($posts as $post) {
            $post->setBlog($this);
        }

        $this->posts = $posts;

        return $this;
    }
801644
public function setItems($items)
    {
        $this->items = ($items instanceof Collection) ? $items : Collection::make($items);

        return $this;
    }
358440
protected function convertAndReturn($comments)
    {
        // Create the return value
        $retval = false;
        if ($comments && is_array($comments) && count($comments)) {
            // Create the array
            $retval = array();
            foreach ($comments as $theComment) {
                // Create a new instance
                $commentInstance = new $this->className($theComment);
                // Append the instance to the return value
                array_push($retval, $commentInstance);
            }
        }
        return $retval;
    }
17047
public function setCollection($collection)
    {
        $this->collection = $collection;

        $this->collection->setCurPage($this->getCurrentPage());

        // we need to set pagination only if passed value integer and more that 0
        $limit = (int)$this->getLimit();
        if ($limit) {
            $this->collection->setPageSize($limit);
        }
        if ($this->getCurrentOrder()) {
            $this->collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
        }

        return $this;
    }
722036
public function setReportedShippingCollections(array $collectionIds)
    {
        try {
            $collectionIds = $this->encoder->encode($collectionIds);
            $this->setData(self::FIELD_REPORTED_SHIPPING_COLLECTIONS, $collectionIds);
        } catch (\InvalidArgumentException $e) {
            $this->_logger->error($e->getMessage());
        }

        return $this;
    }
122564
public function setTranslations(ArrayCollection $translations)
    {
        foreach ($translations as $translation) {
            $translation->setObject($this);
        }

        $this->translations = $translations;
    }
1036271
public function setItems(Collection $items)
    {
        $this->itemsTotal = null;
        $this->total = null;

        foreach ($items as $item) {
            $this->addItem($item);
        }

        return $this;
    }
355733
public function addComment(\Innova\CollecticielBundle\Entity\Comment $comments)
    {
        $this->comments[] = $comments;

        return $this;
    }
103974
public function parse($comment)
    {
        $this->parser->setDocument($comment);

        $this->parsed = $this->parser->parse();


        return $this;
    }