public function DisplayUsage(Page $oP)
 {
     $oP->p(" * pdf format options:");
     $oP->p(" *\tfields: (mandatory) the comma separated list of field codes to export (e.g: name,org_id,service_name...).");
     $oP->p(" *\tpage_size: (optional) size of the page. One of A4, A3, Letter (default is 'A4').");
     $oP->p(" *\tpage_orientation: (optional) the orientation of the page. Either Portrait or Landscape (default is 'Portrait').");
 }
Example #2
0
function Usage(Page $oP)
{
    if (Utils::IsModeCLI()) {
        $oP->p('Usage: php ' . basename(__FILE__) . ' --auth_user=<user> --auth_pwd=<password> --expression=<OQL Query> --query=<phrasebook_id> [--arg_xxx=<query_arguments>] [--no_localize=0|1] [--format=<format>] [--format-options...]');
        $oP->p("Parameters:");
        $oP->p(" * auth_user: the iTop user account for authentication");
        $oP->p(" * auth_pwd: the password of the iTop user account");
    } else {
        $oP->p("Parameters:");
    }
    $oP->p(" * expression: an OQL expression (e.g. SELECT Contact WHERE name LIKE 'm%')");
    $oP->p(" * query: (alternative to 'expression') the id of an entry from the query phrasebook");
    $oP->p(" * arg_xxx: (needed if the query has parameters) the value of the parameter 'xxx'");
    $aSupportedFormats = BulkExport::FindSupportedFormats();
    $oP->p(" * format: (optional, default is html) the desired output format. Can be one of '" . implode("', '", array_keys($aSupportedFormats)) . "'");
    foreach ($aSupportedFormats as $sFormatCode => $sLabel) {
        $oExporter = BulkExport::FindExporter($sFormatCode);
        if ($oExporter !== null) {
            if (!Utils::IsModeCLI()) {
                $oP->add('<hr/>');
            }
            $oExporter->DisplayUsage($oP);
            if (!Utils::IsModeCLI()) {
                $oP->add('</div>');
            }
        }
    }
    if (!Utils::IsModeCLI()) {
        //$oP->add('</pre>');
    }
}
 public function DisplayUsage(Page $oP)
 {
     $oP->p(" * csv format options:");
     $oP->p(" *\tfields: (mandatory) the comma separated list of field codes to export (e.g: name,org_id,service_name...).");
     $oP->p(" *\tseparator: (optional) character to be used as the separator (default is ',').");
     $oP->p(" *\tcharset: (optional) character set for encoding the result (default is 'UTF-8').");
     $oP->p(" *\ttext-qualifier: (optional) character to be used around text strings (default is '\"').");
     $oP->p(" *\tno_localize: set to 1 to retrieve non-localized values (for instance for ENUM values). Default is 0 (= localized values)");
 }
 public function DisplayUsage(Page $oP)
 {
     $oP->p(" * html format options:");
     $oP->p(" *\tfields: (mandatory) the comma separated list of field codes to export (e.g: name,org_id,service_name...).");
 }
 public function DisplayUsage(Page $oP)
 {
     $oP->p(" * spreadsheet format options:");
     $oP->p(" *\tfields: (mandatory) the comma separated list of field codes to export (e.g: name,org_id,service_name...).");
     $oP->p(" *\tno_localize: (optional) pass 1 to retrieve the raw (untranslated) values for enumerated fields. Default: 0.");
 }
 public function DisplayUsage(Page $oP)
 {
     $oP->p(" * xml format options:");
     $oP->p(" *\tThere are no options for the XML format.");
 }
 public function DisplayUsage(Page $oP)
 {
     $oP->p(" * xml format options:");
     $oP->p(" *\tno_localize: set to 1 to retrieve non-localized values (for instance for ENUM values). Default is 0 (= localized values)");
     $oP->p(" *\tlinksets: set to 1 to retrieve links to related objects (1-N or N-N relations). Default is 0 (= only scalar fields)");
 }