J3.x talk

Difference between revisions of "Using Tags in an Extension"

From Joomla! Documentation

(modify bind() method on component's table class)
 
Line 12: Line 12:
 
}
 
}
 
</source>
 
</source>
 +
([[User:Kasiopi|Kasiopi]] ([[User talk:Kasiopi|talk]]) 05:42, 25 June 2013 (CDT))

Revision as of 05:42, 25 June 2013

Also bind() on component's table class on JTable should be overridden. Metadata should be json encoded before preStoreProcess.

public function bind($array, $ignore = '')
{
  if (isset($array['metadata']) && is_array($array['metadata']))
  {
    $registry = new JRegistry;
    $registry->loadArray($array['metadata']);
    $array['metadata'] = (string) $registry;
  }
  return parent::bind($array, $ignore);
}

(Kasiopi (talk) 05:42, 25 June 2013 (CDT))