Пример #1
0
 /**
  * Used to get the DenumItem ID for the given option name.
  *
  * @param string $optionName
  *
  * @return int
  *
  * @since 1.0
  */
 public function getOptionID($optionName)
 {
     $denumItem = new DEnumItem();
     $denumItem->loadByAttribute('value', $optionName);
     $id = $denumItem->getID();
     if (!empty($id)) {
         return $id;
     } else {
         return 0;
     }
 }