Ejemplo n.º 1
0
 /**
  * Checks if an Item needs item-information
  * @return bool
  */
 private function is_item_information()
 {
     if ($this->sample and is_numeric($this->gid)) {
         $sample_template = new SampleTemplate($this->sample->get_template_id());
         $gid_item_array = $sample_template->get_gid_item($this->gid);
         if (is_array($gid_item_array) and count($gid_item_array) >= 1) {
             foreach ($gid_item_array as $key => $value) {
                 if ($value['xml_element'] == "information") {
                     $return_array = array();
                     if ($value['keywords'] == "keywords") {
                         $return_array['keywords'] = true;
                     }
                     if ($value['description'] == "description") {
                         $return_array['description'] = true;
                     }
                     if ($return_array['keywords'] or $return_array['description']) {
                         return $return_array;
                     } else {
                         return false;
                     }
                 }
             }
         }
     } else {
         return false;
     }
 }