예제 #1
0
파일: DEnum.php 프로젝트: alphadevx/alpha
 /**
  * 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;
     }
 }