QuerygenCommand
- Type
- Class
- Namespace
- Craft
- Inherits
- Craft\QuerygenCommand » Craft\BaseCommand » CConsoleCommand (opens new window) » CComponent (opens new window)
- Since
- 1.0
The query generator console command.
See also http://craftcms.com
View source (opens new window)
# Public Properties
Property | Description |
---|---|
$defaultAction | string (opens new window) |
# $defaultAction
Signature
public string $defaultAction = 'all'
# Public Methods
Method | Description |
---|---|
__call() (opens new window) | Calls the named method which is not a class method. |
__construct() (opens new window) | Constructor. |
__get() (opens new window) | Returns a property value, an event handler list or a behavior based on its name. |
__isset() (opens new window) | Checks if a property value is null. |
__set() (opens new window) | Sets value of a component property. |
__unset() (opens new window) | Sets a component property to be null. |
actionAddForeignKeysForRecord() | Returns the PHP code to add foreign keys to a table for a given record. |
actionAll() | |
actionCreateTableForRecord() | Returns the PHP code to create a new table from a given record. |
asa() (opens new window) | Returns the named behavior object. |
attachBehavior() (opens new window) | Attaches a behavior to this component. |
attachBehaviors() (opens new window) | Attaches a list of behaviors to the component. |
attachEventHandler() (opens new window) | Attaches an event handler to an event. |
behaviors() (opens new window) | Returns a list of behaviors that this command should behave as. |
buildFileList() (opens new window) | Builds the file list of a directory. |
canGetProperty() (opens new window) | Determines whether a property can be read. |
canSetProperty() (opens new window) | Determines whether a property can be set. |
confirm() (opens new window) | Asks user to confirm by typing y or n. |
copyFiles() (opens new window) | Copies a list of files from one place to another. |
detachBehavior() (opens new window) | Detaches a behavior from the component. |
detachBehaviors() (opens new window) | Detaches all behaviors from the component. |
detachEventHandler() (opens new window) | Detaches an existing event handler. |
disableBehavior() (opens new window) | Disables an attached behavior. |
disableBehaviors() (opens new window) | Disables all behaviors attached to this component. |
enableBehavior() (opens new window) | Enables an attached behavior. |
enableBehaviors() (opens new window) | Enables all behaviors attached to this component. |
ensureDirectory() (opens new window) | Creates all parent directories if they do not exist. |
evaluateExpression() (opens new window) | Evaluates a PHP expression or callback under the context of this component. |
getCommandRunner() (opens new window) | |
getEventHandlers() (opens new window) | Returns the list of attached event handlers for an event. |
getHelp() (opens new window) | Provides the command description. |
getName() (opens new window) | |
getOptionHelp() (opens new window) | Provides the command option help information. |
hasEvent() (opens new window) | Determines whether an event is defined. |
hasEventHandler() (opens new window) | Checks whether the named event has attached handlers. |
hasProperty() (opens new window) | Determines whether a property is defined. |
init() (opens new window) | Initializes the command object. |
onAfterAction() (opens new window) | This event is raised after an action finishes execution. |
onBeforeAction() (opens new window) | This event is raised before an action is to be executed. |
pluralize() (opens new window) | Converts a word to its plural form. |
prompt() (opens new window) | Reads input via the readline PHP extension if that's available, or fgets() if readline is not installed. |
raiseEvent() (opens new window) | Raises an event. |
renderFile() (opens new window) | Renders a view file. |
run() (opens new window) | Executes the command. |
usageError() (opens new window) | Displays a usage error. |
# actionAddForeignKeysForRecord()
Returns the PHP code to add foreign keys to a table for a given record.
View source (opens new window)
Arguments
$args
Returns
Signature
public integer actionAddForeignKeysForRecord ( $args )
# actionAll()
Signature
public void actionAll ( $args )
# actionCreateTableForRecord()
Returns the PHP code to create a new table from a given record.
View source (opens new window)
Arguments
$args
Returns
Signature
public integer actionCreateTableForRecord ( $args )
# Protected Methods
Method | Description |
---|---|
afterAction() (opens new window) | This method is invoked right after an action finishes execution. |
beforeAction() (opens new window) | This method is invoked right before an action is to be executed. |
resolveRequest() (opens new window) | Parses the command line arguments and determines which action to perform. |