/**
  * @return Asset
  */
 public function getAsset()
 {
     $asset = Asset::getAssets($this->id, Asset::ASSETABLE_MATCH_EVENT, NULL, true);
     if ($asset->assetable_type == null) {
         $asset->assetable_type = Asset::ASSETABLE_MATCH_EVENT;
     }
     return $asset;
 }
示例#2
0
 /**
  * Get guest team logo asset
  *
  * @return Asset
  */
 public function getAssetGuest()
 {
     return Asset::getAssets($this->command_guest_id, Asset::ASSETABLE_TEAM, NULL, true);
 }
示例#3
0
 /**
  * @return Asset
  */
 public function getAsset($thumbnail = false)
 {
     return Asset::getAssets($this->id, Asset::ASSETABLE_COACH, $thumbnail, true);
 }
 /**
  * Deletes an existing Coach model.
  * If deletion is successful, the browser will be redirected to the 'index' page.
  * @param integer $id
  * @return mixed
  */
 public function actionDelete($id)
 {
     $model = $this->findModel($id);
     $assets = Asset::getAssets($model->id, Asset::ASSETABLE_USER, NULL);
     foreach ($assets as $asset) {
         $asset->delete();
     }
     $model->delete();
     return $this->redirect(['index']);
 }
示例#5
0
 /**
  * @return Asset
  */
 public function getAsset($thumbnail = Asset::THUMBNAIL_CONTENT)
 {
     return Asset::getAssets($this->id, Asset::ASSETABLE_TEAM, $thumbnail, true);
 }
 /**
  * Delete an existing User model. If deletion is successful, the browser
  * will be redirected to the 'index' page.
  *
  * @param string $id
  * @return mixed
  */
 public function actionDelete($id)
 {
     // delete profile and userkeys first to handle foreign key constraint
     $user = $this->findModel($id);
     // Sidash
     if ($user->id == 1) {
         return $this->redirect(['index']);
     }
     $profile = $user->profile;
     UserKey::deleteAll(['user_id' => $user->id]);
     UserAuth::deleteAll(['user_id' => $user->id]);
     $profile->delete();
     $user->delete();
     $assets = Asset::getAssets($user->id, Asset::ASSETABLE_USER, null);
     foreach ($assets as $asset) {
         $asset->delete();
     }
     return $this->redirect(['index']);
 }
示例#7
0
 /**
  * Get single video asset
  * @return Asset
  */
 public function getVideoAsset()
 {
     return Asset::getAssets($this->id, Asset::ASSETABLE_VIDEOFILE, NULL, true);
 }
示例#8
0
 /**
  * @return Asset
  */
 public function getAsset($thumbnail = Asset::THUMBNAIL_SMALL)
 {
     return Asset::getAssets($this->id, Asset::ASSETABLE_COUNTRY, $thumbnail, true);
 }
示例#9
0
 /**
  * @return Asset
  */
 public function getAsset($thumbnail = Asset::THUMBNAIL_CONTENT)
 {
     $asset = Asset::getAssets($this->id, Asset::ASSETABLE_USER, $thumbnail, true);
     return $asset;
 }
示例#10
0
 /**
  * Get single cover image asset
  *
  * @param string $thumbnail
  * @return Asset
  */
 public function getCoverImageAsset($thumbnail = NULL)
 {
     return Asset::getAssets($this->id, Asset::ASSETABLE_ALBUM_COVER, $thumbnail, true);
 }
示例#11
0
 /**
  * Get single asset
  *
  * @param string $thumbnail
  *
  * @return Asset
  */
 public function getAsset($thumbnail = NULL)
 {
     return Asset::getAssets($this->id, Asset::ASSETABLE_POST, $thumbnail, true);
 }