/**
* This method loads prepares the tag associated data for saving it directly to the blog model
*
* @param array $data
* @param Blog $blogModel
*/
protected function prepareTagAssociatedData($data,
$blogModel) { $tags =
explode(',',
$data['tags'
]);
foreach ($tags as $tag) { if (!
empty($tag)) { $tagModel =
new Tag();
$tagModel->
setName($tag);
$tagModel->
setBlog($blogModel);
$this->
getManager()->
persist($tagModel);
} } } /**
* This method prepares the media data for saving it directly to the blog model
*
* @param array $mediaData
*
* @return array
*/