Пример #1
0
 /**
  * Save Asset with Tag
  * 
  * @param ActiveRecordInterface $assetModel the Asset model to be linked with the current one.
  * @param ActiveRecordInterface $tagModel the Tag model to be linked with the current one.
  */
 public static function saveAssetTag($assetModel, $tagModel)
 {
     $model = self::loadAssetTag($assetModel->Id, $tagModel->Id);
     if ($assetModel) {
         $assetModel->link('tagassetmaps', $model);
     }
     if ($tagModel) {
         $tagModel->link('tagassetmaps', $model);
     }
 }