Exemplo n.º 1
0
 public function validate(SxModule_Sheets_Type $object)
 {
     $this->validateTextRequired($object->getName(), 'name', 'settings', $this->_namespace);
     $msgr = Sanmax_MessageStack::getInstance($this->_namespace);
     if (!$msgr->getNamespaceMessages()) {
         return true;
     }
     return false;
 }
Exemplo n.º 2
0
 public function toArray(SxModule_Sheets_Type $item, $type = '*')
 {
     $data = array('type_id' => $item->getId(), 'scheme' => $item->getScheme(), 'active' => $item->getActive(), 'position' => $item->getPosition());
     $tsl = array('lng' => $item->getLng(), 'name' => $item->getName());
     if ($type == 'item') {
         return $data;
     } elseif ($type == 'tsl') {
         return $tsl;
     }
     return array_merge($data, $tsl);
 }