Exemplo n.º 1
0
 public function storeValue($value)
 {
     $aliasField = new JUDirectoryFieldCore_alias(null, $this->listing);
     $aliasField->fields_data = $this->fields_data;
     if ($this->is_new && (!$aliasField->canSubmit() || $aliasField->canSubmit() && $this->fields_data[$aliasField->id] == "") || !$this->is_new && (!$aliasField->canEdit() || $aliasField->canEdit() && $this->fields_data[$aliasField->id] == "")) {
         $aliasValue = $aliasField->filterField($value);
         $aliasField->storeValue($aliasValue);
     }
     if (parent::storeValue($value)) {
         JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_judirectory/tables');
         $tableListing = JTable::getInstance('Listing', 'JUDirectoryTable');
         $tableListing->load($this->listing_id);
         if (isset($tableListing->asset_id) && $tableListing->asset_id > 0) {
             $db = JFactory::getDbo();
             $query = $db->getQuery(true);
             $query->update('#__assets');
             $query->set('title =' . $db->quote($value));
             $query->where('id =' . $tableListing->asset_id);
             $db->setQuery($query);
             $db->execute();
         }
     }
 }
Exemplo n.º 2
0
 public function getOutput($options = array())
 {
     $this->setAttribute("style", 'float: left; margin-right: 2px;', "output");
     return parent::getOutput($options);
 }