|
|
@@ -23,6 +23,35 @@ class BxAlbumsModule extends BxBaseModTextModule
|
|
|
parent::__construct($aModule);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Entry actions and social sharing block
|
|
|
+ */
|
|
|
+ public function serviceEntityAllActions ($mixedContent = false, $aParams = array())
|
|
|
+ {
|
|
|
+ if(!empty($mixedContent)) {
|
|
|
+ if(!is_array($mixedContent))
|
|
|
+ $mixedContent = array((int)$mixedContent, array());
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $mixedContent = $this->_getContent();
|
|
|
+ if($mixedContent === false)
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ list($iContentId, $aContentInfo) = $mixedContent;
|
|
|
+
|
|
|
+ $aMedias = $this->_oDb->getMediaListByContentId($iContentId);
|
|
|
+ if(!empty($aMedias) && is_array($aMedias)) {
|
|
|
+ $aMedia = array_shift($aMedias);
|
|
|
+ if(!empty($aMedia['file_id']))
|
|
|
+ $aParams = array_merge(array(
|
|
|
+ 'entry_thumb' => $aMedia['file_id']
|
|
|
+ ), $aParams);
|
|
|
+ }
|
|
|
+
|
|
|
+ return parent::serviceEntityAllActions(array($iContentId, $aContentInfo), $aParams);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Display form for adding media to the album.
|
|
|
* @param $iContentId album content id where media will be added, if it's not provided then it's determined from 'id' GET variable
|