Esempio n. 1
0
    protected function configure()
    {
        $this->setName('api')->setDescription('Call an API')->addOption('in', NULL, InputOption::VALUE_REQUIRED, 'Input format (args,json)', 'args')->addOption('out', NULL, InputOption::VALUE_REQUIRED, 'Output format (' . implode(',', Encoder::getFormats()) . ')', Encoder::getDefaultFormat())->addArgument('Entity.action', InputArgument::REQUIRED)->addArgument('key=value', InputArgument::IS_ARRAY)->setHelp('Call an API

Examples:
  cv api system.get
  cv api contact.get id=10
  echo \'{"id":10, "api.Email.get": 1}\' | cv api contact.get --in=json

NOTE: To change the default output format, set CV_OUTPUT.
');
        parent::configureBootOptions();
    }
Esempio n. 2
0
    protected function configure()
    {
        $this->setName('url')->setDescription('Compose a URL to a CiviCRM page')->addArgument('path')->addOption('out', NULL, InputArgument::OPTIONAL, 'Specify return format (json,none,php,pretty,shell)', \Civi\Cv\Encoder::getDefaultFormat())->addOption('relative', 'r', InputOption::VALUE_NONE, 'Prefer relative URL format. (Default: absolute)')->addOption('frontend', 'f', InputOption::VALUE_NONE, 'Generate a frontend URL (Default: backend)')->addOption('open', 'O', InputOption::VALUE_NONE, 'Open a local web browser')->setHelp('
Compose a URL to a CiviCRM page

Examples:
  cv url civicrm/dashboard
  cv url civicrm/dashboard --open
  cv url \'civicrm/a/#/mailing/123?angularDebug=1\'

NOTE: To change the default output format, set CV_OUTPUT.
');
        parent::configureBootOptions();
    }
Esempio n. 3
0
    protected function configure()
    {
        $this->setName('php:eval')->setAliases(array('ev'))->setDescription('Evaluate a snippet of PHP code')->addArgument('code')->addOption('out', NULL, InputArgument::OPTIONAL, 'Specify return format (auto,' . implode(',', Encoder::getFormats()) . ')', 'auto')->setHelp('
Evaluate a snippet of PHP code

Examples:
  cv ev \'civicrm_api3("System", "flush", array());\'
  cv ev \'if (rand(0,10)<5) echo "heads\\n"; else echo "tails\\n";\'

When reading data, you may use "return":
  cv ev \'return CRM_Utils_System::version()\'
  cv ev \'return CRM_Utils_System::version()\' --out=shell
  cv ev \'return CRM_Utils_System::version()\' --out=json

If the output format is set to "auto". This will be produce silent output -- unless
you use a "return" statement. In that case, it will use the default (' . \Civi\Cv\Encoder::getDefaultFormat() . ').

NOTE: To change the default output format, set CV_OUTPUT.
');
        parent::configureBootOptions();
    }
Esempio n. 4
0
 protected function configure()
 {
     $this->setName('vars:edit')->setDescription('Edit configuration values for this build');
     parent::configureBootOptions();
 }
Esempio n. 5
0
 protected function configure()
 {
     $this->setName('cli')->setDescription('Load interactive command line');
     parent::configureBootOptions();
 }
Esempio n. 6
0
 protected function configure()
 {
     $this->setName('vars:fill')->setDescription('Generate a configuration file for any missing site data')->addOption('file', NULL, InputOption::VALUE_REQUIRED, 'Read existing configuration from a file');
     parent::configureBootOptions();
 }
Esempio n. 7
0
 protected function configure()
 {
     $this->setName('php:boot')->setDescription('Generate PHP bootstrap code');
     parent::configureBootOptions();
 }
Esempio n. 8
0
 protected function configure()
 {
     $this->setName('vars:show')->setDescription('Show the configuration of the local CiviCRM installation')->addOption('out', NULL, InputOption::VALUE_REQUIRED, 'Output format (' . implode(',', Encoder::getFormats()) . ')', Encoder::getDefaultFormat());
     parent::configureBootOptions();
 }
Esempio n. 9
0
 protected function configure()
 {
     $this->setName('php:script')->setAliases(array('scr'))->setDescription('Execute a PHP script')->addArgument('script', InputArgument::REQUIRED);
     parent::configureBootOptions();
 }