Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.32 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public function getStateAbbrv($state= '')
  2.         {
  3.                 return $this->getStateField($state, 'abbrv');
  4.         }
  5.  
  6.         public function getStateField($state= '', $field= 'id')
  7.         {
  8.  
  9.                 if ($criteria= $this->setStateCriteria($state))
  10.                 {
  11.                         $obj= $this->modx->getObject('State', $criteria);
  12.                 }
  13.                 return ($obj) ? $obj->get($field) : false;
  14.         }