if(!empty($id)){ // Edit Data
/** @var Blog $blogModel */ $blogModel = $this->getManager()->getRepository(Blog::class)->find($id); // Deletes all old blog tags
$this->deleteOldTags($id); }else{ // New Data
$blogModel = newBlog(); } // Setting the date in this way cause ext js got no datetime field
$params['displayDate'] = $params['displayDate'] . ' ' . $params['displayTime'];