PHP Class NerdsAndCompany\Schematic\Services\Schematic

Sync Craft Setups.
Author: Nerds & Company
Inheritance: extends Craft\BaseApplicationComponent
Show file Open project: itmundi/schematic Class Usage Examples

Protected Properties

Property Type Description
$exportableDataTypes

Public Methods

Method Description
checkPermission ( ) : boolean Assume schematic can do anything.
exportToYaml ( string $file, $dataTypes = 'all', boolean $autoCreate = true ) : Result Export to Yaml file.
getExportableDataTypes ( )
getUser ( ) : Craft\Craft\UserModel Always return the super user.
importFromYaml ( string $file, string $override = null, boolean $force = false ) : Result Import from Yaml file.

Private Methods

Method Description
doExport ( array $services, array &$data ) Handles exporting.
doImport ( Result $result, array $data, array | Base[] $services, boolean $force ) Handles importing.
exportDataModel ( string | array $dataTypes = 'all' ) : array Export data model.
getPluginData ( array $data, string $handle, array $default = [] ) : array Returns data from import model or default.
importDataModel ( Data $model, boolean $force ) : Result Import data model.

Method Details

checkPermission() public method

Assume schematic can do anything.
public checkPermission ( ) : boolean
return boolean

exportToYaml() public method

Export to Yaml file.
public exportToYaml ( string $file, $dataTypes = 'all', boolean $autoCreate = true ) : Result
$file string
$autoCreate boolean
return NerdsAndCompany\Schematic\Models\Result

getExportableDataTypes() public static method

public static getExportableDataTypes ( )

getUser() public method

Always return the super user.
public getUser ( ) : Craft\Craft\UserModel
return Craft\Craft\UserModel

importFromYaml() public method

Import from Yaml file.
public importFromYaml ( string $file, string $override = null, boolean $force = false ) : Result
$file string
$override string
$force boolean if set to true items not included in import will be deleted
return NerdsAndCompany\Schematic\Models\Result

Property Details

$exportableDataTypes protected static property

protected static $exportableDataTypes