/** * Takes an account-entity and the id of a media and adds the media as the logo of the account. * TODO: handle logo adding differently and remove this method (or make it private). * * @param Account $account * @param int $mediaId */ public function setLogo($account, $mediaId) { $media = $this->mediaManager->getEntityById($mediaId); $account->setLogo($media); }