예제 #1
0
 public function getLogoUrl()
 {
     $attachment = Attachment::find()->where([AttachmentIndex::tableName() . '.entity' => get_class($this), AttachmentIndex::tableName() . '.entity_id' => 0, AttachmentIndex::tableName() . '.attribute' => "appLogoImage"])->leftJoin(AttachmentIndex::tableName(), AttachmentIndex::tableName() . '.attachment_id =' . Attachment::tableName() . ".attachment_id")->one();
     if ($attachment) {
         return $attachment->getUrl();
     }
     return null;
 }