Exemplo n.º 1
0
 /**
  * Find where the file is used
  *
  * @param string $file
  * file src
  * 
  * @return array
  * file using places list
  */
 function getRelations($file)
 {
     require_once 'models/common/common_file.php';
     $CommonFile = new common_file();
     $file_list['file'] = $CommonFile->getFileLink($file);
     require_once 'models/common/common_image.php';
     $CommonImage = new common_image();
     $file_list['node'] = $CommonImage->getFileLink($file);
     require_once 'models/ecommerce/ecommerce_product_image.php';
     $ProductImage = new ecommerce_product_image();
     $file_list['product'] = $ProductImage->getFileLink($file);
     require_once 'models/ecommerce/ecommerce_product_variety_image.php';
     $ProductVarietyImage = new ecommerce_product_variety_image();
     $file_list['product_variety'] = $ProductVarietyImage->getFileLink($file);
     require_once 'models/common/common_taxonomy_label_image.php';
     $TaxonomyImage = new common_taxonomy_label_image();
     $file_list['taxonomy'] = $TaxonomyImage->getFileLink($file);
     require_once 'models/ecommerce/ecommerce_recipe_image.php';
     $RecipeImage = new ecommerce_recipe_image();
     $file_list['recipe'] = $RecipeImage->getFileLink($file);
     require_once 'models/ecommerce/ecommerce_store_image.php';
     $StoreImage = new ecommerce_store_image();
     $file_list['store'] = $StoreImage->getFileLink($file);
     require_once 'models/education/education_survey_image.php';
     $SurveyImage = new education_survey_image();
     $file_list['survey'] = $SurveyImage->getFileLink($file);
     $file_list['count'] = count($file_list['file']) + count($file_list['node']) + count($file_list['product']) + count($file_list['product_variety']) + count($file_list['taxonomy']) + count($file_list['recipe']) + count($file_list['store']) + count($file_list['survey']);
     return $file_list;
 }
Exemplo n.º 2
0
 /**
  * getImages
  */
 public function getImages($label_id, $role = false)
 {
     if (!is_numeric($label_id)) {
         return false;
     }
     require_once 'models/common/common_taxonomy_label_image.php';
     $LabelImage = new common_taxonomy_label_image();
     if ($role) {
         $query = "node_id = {$label_id} AND role = '{$role}'";
     } else {
         $query = "node_id = {$label_id}";
     }
     $list = $LabelImage->listing($query);
     return $list;
 }