Jump to content

Export

From NusaATK
Revision as of 16:32, 19 December 2007 by bahtiar (talk | contribs) (New page: Export can be enabled by using the NF_EXPORT flag. == Hooks == === getExportAttributes === Default the export shows all attributes to export (except for the atkDummyAttribute, atkTabb...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Export can be enabled by using the NF_EXPORT flag.


Hooks

getExportAttributes

Default the export shows all attributes to export (except for the atkDummyAttribute, atkTabbedPaneAttribute and attributes that contains the word image). You can override this function in your own node like this:

  function getExportAttributes(&$handler)
  {
    $attribs = $handler->getExportAttributes();
    unset($attribs['visits']);
    return $attribs;
  }


getExportAttributeGroup

Default every tab will become a group of attributes in the export screen, you can also define those groups yourself by creating an override like this:

 function getExportAttributeGroup($attributename)
  {
    if (in_array($attributename, array("address", "address2", "zipcode", "city", "state", "country"))) return "organization_visitaddress";
    if (strpos($attributename, "mail_") === 0) return "organization_mailaddress";
    if (strpos($attributename, "invoice_") === 0) return "organization_invoiceaddress";
  }