Skip to content

nganivet/civix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Civix is a command-line tool for building CiviCRM extensions.

Requirements

Unix/Mac Installation

cd $HOME

# If you haven't already, install the PHP tool "composer"
curl -s http://getcomposer.org/installer | php

# Download civix and dependencies
git clone git://github.com/totten/civix.git
cd civix
php $HOME/composer.phar install

# Add civix to the PATH
export PATH=$HOME/civix:$PATH

Windows Installation

# Install composer
In a browser, visit http://getcomposer.org
Click on the download button.
Scroll down to Windows Installer and click on Composer-Setup.exe.
Choose Run when prompted.

# Install git
If you don't already have git, then in a browser visit http://git-scm.com/download/win.
Choose Run when prompted.
Leave all the defaults.

# Download civix
Decide where you want to install civix. You might want to put it in C:\Program Files, but you might get hassled about admin rights, in which case you can pick somewhere else, like C:\users\<your name>.
From the start menu choose All Programs -> Git -> Git Bash.
In the window that appears, type:
  cd "/c/users/<your name>"
  (note the forward slashes)
git clone git://github.com/totten/civix.git
exit

# Download dependencies
In windows explorer, navigate to C:\users\<your name> (or whereever you installed civix).
Shift-right-click on the civix folder.
Choose open command window here.
In the window that appears, type:
  composer install

# Add civix to the PATH
Either temporarily add it:
set PATH=%PATH%;C:\users\<your name>\civix

OR permanently:
Start Menu -> Control Panel -> System -> Advanced -> Environment Variables

Post-install Configuration, all operating systems

# Link civix with a developmental CiviCRM site/source-tree.
# This requires knowing the directory which contains civicrm.settings.php
# For example, using a default installation of Drupal-CiviCRM with Debian/Ubuntu,
# the path might be "/var/www/drupal/sites/default/".
civix config:set civicrm_api3_conf_path /var/www/drupal/sites/default/

# To validate that the link is working, run:
civix civicrm:ping

Upgrade

To upgrade civix and its dependencies, one can normally do:

cd $HOME/civix
git pull
php $HOME/composer.phar install

On some occasions, changes in civix, in a dependency, or in composer can break the upgrade. If this happens, then try deleting the dependencies and re-installing them:

php $HOME/composer.phar self-update
cd $HOME/civix
git pull
rm -rf vendor
php $HOME/composer.phar install

Documentation

The CiviCRM wiki includes tutorials for building extensions. See:

http://wiki.civicrm.org/confluence/display/CRMDOC42/Create+an+Extension

For reference documentation, civix supports a "--help" option. For example, to get reference materials about the "generate:page" command, run:

civix generate:page --help

About

CiviCRM Extension Builder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%