Merge pull request #2326 from eileenmcnaughton/CRM-14069
[civicrm-core.git] / CRM / Core / BAO / File.php
index 1a66be5954f5894353d8b780b31b964b4fb3728e..db765e5627b5842333c1566240351904aa3a1c11 100644 (file)
 
    static $_signableFields = array('entityTable', 'entityID', 'fileID');
 
+   /**
+    * @param $fileID
+    * @param $entityID
+    * @param null $entityTable
+    *
+    * @return array
+    */
    static function path($fileID, $entityID, $entityTable = NULL) {
      $entityFileDAO = new CRM_Core_DAO_EntityFile();
      if ($entityTable) {
    }
 
 
+   /**
+    * @param $data
+    * @param $fileTypeID
+    * @param $entityTable
+    * @param $entityID
+    * @param $entitySubtype
+    * @param bool $overwrite
+    * @param null $fileParams
+    * @param string $uploadName
+    * @param null $mimeType
+    *
+    * @throws Exception
+    */
    static function filePostProcess(
      $data,
      $fileTypeID,
      return $results;
    }
 
+   /**
+    * @param $entityTable
+    * @param $entityID
+    * @param null $fileTypeID
+    * @param null $fileID
+    *
+    * @return array
+    */
    static function sql($entityTable, $entityID, $fileTypeID = NULL, $fileID = NULL) {
      $sql = "
  SELECT    CF.id as cfID,
      return array($sql, $params);
    }
 
+   /**
+    * @param $form
+    * @param $entityTable
+    * @param null $entityID
+    * @param null $numAttachments
+    * @param bool $ajaxDelete
+    */
    static function buildAttachment(&$form, $entityTable, $entityID = NULL, $numAttachments = NULL, $ajaxDelete = FALSE) {
 
      if (!$numAttachments) {
      return NULL;
    }
 
+   /**
+    * @param $formValues
+    * @param $params
+    * @param $entityTable
+    * @param null $entityID
+    */
    static function formatAttachment(
      &$formValues,
      &$params,
      }
    }
 
+   /**
+    * @param $params
+    * @param $entityTable
+    * @param $entityID
+    */
    static function processAttachment(&$params, $entityTable, $entityID) {
      $numAttachments = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'max_attachments');
 
      }
    }
 
+   /**
+    * @return array
+    */
    static function uploadNames() {
      $numAttachments = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'max_attachments');
 
     * Function to copy/attach an existing file to a different entity
     * table and id.
     */
+   /**
+    * @param $oldEntityTable
+    * @param $oldEntityId
+    * @param $newEntityTable
+    * @param $newEntityId
+    */
    static function copyEntityFile($oldEntityTable, $oldEntityId, $newEntityTable, $newEntityId) {
     $oldEntityFile = new CRM_Core_DAO_EntityFile();
     $oldEntityFile->entity_id = $oldEntityId;
     }
   }
 
-  static function deleteURLArgs($entityTable, $entityID, $fileID) {
+   /**
+    * @param $entityTable
+    * @param $entityID
+    * @param $fileID
+    *
+    * @return string
+    */
+   static function deleteURLArgs($entityTable, $entityID, $fileID) {
     $params['entityTable'] = $entityTable;
     $params['entityID']    = $entityID;
     $params['fileID']      = $fileID;