Plentymarkets interface documentation
Plugin
Contracts
ConfigurationRepositoryContract
Save config values for plugins
Namespace
Plenty\Modules\Plugin\Contracts
Methods
public saveConfiguration($pluginId, $configMap, $setId = null, $resetCache = true):array| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public copyToPluginSetEntry($configurationOrId, $pluginSetEntryOrId):int| Name | Type | Description | 
| 
 | ||
| 
 | 
public getConfigurationFile($pluginId, $setId):string| Name | Type | Description | 
| 
 | ||
| 
 | 
public export($setId, $pluginId = null, $active = null):array| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public import($setId, $data, $pluginId = null):void| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
PluginLayoutContainerRepositoryContract
Plugin layout container
Namespace
Plenty\Modules\Plugin\Contracts
Methods
public all($pluginSetId):void| Name | Type | Description | 
| 
 | 
public updateAll($dataList, $pluginSetId, $pluginId = null):void| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public getActiveLinkedLayoutContainers($activeContainerKeysList, $activeDataProviderKeysList, $pluginSetId = null):void| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public getActiveLinkedLayoutContainersByPluginSetId($activeContainerKeysList, $activeDataProviderKeysList, $pluginSetId):void| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public addNew($dataList, $pluginSetId):void| Name | Type | Description | 
| 
 | ||
| 
 | 
public addOne($pluginSetId, $containerKey, $dataProviderKey, $containerPluginId = null, $dataProviderPluginId = null):void| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public removeOne($pluginSetId, $containerKey, $dataProviderKey, $containerPluginId = null, $dataProviderPluginId = null):void| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public exportByPluginSetId($pluginSetOrId):array| Name | Type | Description | 
| 
 | 
public importByPluginSetId($pluginSetOrId, $containers):void| Name | Type | Description | 
| 
 | ||
| 
 | 
PluginRepositoryContract
Search plugins according to parameters
Namespace
Plenty\Modules\Plugin\Contracts
Methods
public getPluginByName($name):Plenty\Modules\Plugin\Models\PluginReturn type:        Plugin
| Name | Type | Description | 
| 
 | 
public searchPlugins($params = [], $itemsPerPage = \Plenty\Modules\Plugin\Models\Plugin::DEFAULT_ITEMS_PER_PAGE):Plenty\Repositories\Models\PaginatedResultReturn type:        PaginatedResult
Search plugins using filters. Example: searchPlugins(['name' => 'PluginIWantToFind'])
| Name | Type | Description | 
| 
 | ||
| 
 | 
public getPluginSets($pluginId):array| Name | Type | Description | 
| 
 | 
public isActiveInPluginSet($pluginId, $pluginSetIdOrPluginSet):bool| Name | Type | Description | 
| 
 | ||
| 
 | 
public isActiveInPluginSetByName($pluginName, $pluginSetId):bool| Name | Type | Description | 
| 
 | ||
| 
 | 
public isActiveInWebstore($pluginId, $webstoreId):bool| Name | Type | Description | 
| 
 | ||
| 
 | 
public isActiveInWebstoreByPluginName($pluginName, $webstoreId):bool| Name | Type | Description | 
| 
 | ||
| 
 | 
public decoratePlugin($plugin, $pluginSetId = null):Plenty\Modules\Plugin\Models\PluginEvents
AfterBuildPlugins
Event after plugin build has finished
Namespace
Plenty\Modules\Plugin\Events
Methods
public getPluginSet():Plenty\Modules\Plugin\PluginSet\Models\PluginSetReturn type:        PluginSet
Get the plugin set which have been built
public sourceHasChanged($pluginName):boolCheck if php files of a plugin have been changed
| Name | Type | Description | 
| 
 | 
public resourcesHasChanged($pluginName):boolCheck if resource files of a plugin have been changed
| Name | Type | Description | 
| 
 | 
public broadcastAs():voidpublic broadcastPayload():voidpublic getWebstoreId():voidpublic broadcastWhen():voidpublic broadcastConnections():voidpublic broadcastOn():voidpublic broadcastWith():voidAfterCodeUpdate
Event after a plugin file was updated.
Namespace
Plenty\Modules\Plugin\Events
Methods
public getPluginSetId():intpublic getPluginId():intModels
InstalledPlugins
Model representing an installed Plugin
Namespace
Plenty\Modules\Plugin\Models
| Name | Type | Description | 
|---|---|---|
| id | The ID of the installed plugin instance | |
| variationId | The variationId of the installed version | |
| itemId | The id of the installed plugin | |
| removed | Whether this version of the plugin has been removed by the customer | |
| lastUpdateChecksum | checksum of last installed plugin code | 
Methods
public toArray()Returns this model as an array.
Plugin
Eloquent model representing a Plugin.
Namespace
Plenty\Modules\Plugin\Models
| Name | Type | Description | 
|---|---|---|
| id | The ID of the plugin | |
| name | The name of the plugin | |
| position | The position of the plugin. The position is used to determine the plugin order. | |
| activeStage | Shows whether the plugin is active in Stage. Inactive plugins will not be provisioned in Stage. | |
| activeProductive | Shows whether the plugin is active in Productive. Inactive plugins will not be provisioned in Productive. | |
| created_at | The date that the plugin was created. | |
| updated_at | The date that the plugin was updated last. | |
| inStage | Shows whether the plugin is provisioned in Stage. | |
| inProductive | Shows whether the plugin is provisioned in Productive. | |
| isConnectedWithGit | ||
| isInstalledWithGit | ||
| updateInformation | ||
| type | The type of the plugin. The following plugin types are available: <ul> <li>Template</li> <li>Export</li> </ul> | |
| installed | Whether or not the plugin is installed. This will be false for plugins that have been purchased from the marketplace but have not yet been installed in any set. | |
| version | The version of the plugin | |
| versionStage | The version of the plugin in stage | |
| versionProductive | The version of the plugin in productive | |
| marketplaceVariations | A list of available marketplace versions | |
| description | The description text of the plugin | |
| namespace | The namespace of the plugin | |
| dependencies | A list of plugins with dependencies to the plugin | |
| author | The name of the plugin author | |
| price | The price of the plugin | |
| keywords | A list of plugin keywords | |
| require | A list of plugins that are required by the plugin | |
| platform | Details about what platform does the plugin support. | |
| notInstalledRequirements | A list of required plugins that are not installed | |
| notActiveStageRequirements | A list of required plugins that are not active in stage | |
| notActiveProductiveRequirements | A list of required plugins that are not active in productive | |
| serviceProvider | The class name of the service provider | |
| runOnBuild | The list of classes to execute once on plugin build | |
| checkOnBuild | The list of classes to execute on every plugin build | |
| pluginPath | The plugin path | |
| authorIcon | The author icon | |
| pluginIcon | The plugin icon | |
| license | The plugin license | |
| shortDescription | ||
| isClosedSource | is closed source | |
| inboxPath | path in the inbox (closed source, open source) | |
| marketplaceName | The plugin name displayed in marketplace | |
| source | Whether this plugin was installed from marketplace, git or local | |
| javaScriptFiles | A list of included javascript files | |
| containers | A list of provided containers with name and description | |
| dataProviders | A list of data providers with name and description | |
| categories | ||
| webhookUrl | webhookUrl | |
| isExternalTool | is external tool | |
| directDownloadLinks | A list of urls for the external tool | |
| forwardLink | A forward link to the external tool developers page | |
| branch | The branch to checkout for this particular Plugin | |
| commit | The commit to checkout for this particular Plugin | |
| subscriptionInformation | A list if subscription informations | |
| offerTrial | Determines if the plugin offers a trial period for plentyMarketplace | |
| offerFreemium | Determines if the plugin offers freemium functionality | |
| configurations | A list of plugin configuration items | |
| webstores | A list of clients (stores) activated for the plugin | |
| linkedDataProviders | A list of dataProviders linked with a container of this plugin | |
| linkedContainers | A list of containers linked with a data provider of this plugin | |
| repository | ||
| installedPlugins | ||
| pluginSetIds | Array of PluginSet Ids where this plugin is contained. | |
| pluginSetEntries | A list of PluginSetEntries this plugin is linked to | |
| pluginSetEntriesWithTrashed | A list of PluginSetEntries this plugin is linked to, including trashed entries | 
Methods
public toArray()Returns this model as an array.
Services
PluginSendMailService
The PluginSendMailService send mails in plugins
Namespace
Plenty\Modules\Plugin\Services
Methods
public static getInstance($webstoreId):void| Name | Type | Description | 
| 
 | 
public sendMail($url, $template = "", $email = "", $callFunction = "", $webstoreId = null):bool| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public getStatus():boolpublic setStatus($status):void| Name | Type | Description | 
| 
 | 
public isInitialized():boolpublic setInitialized($initialized):void| Name | Type | Description | 
| 
 | 
public getEmailPlaceholder():arraypublic addEmailPlaceholder($placeholder, $value):void| Name | Type | Description | 
| 
 | ||
| 
 | 
public setEmailPlaceholder($emailPlaceholder):void| Name | Type | Description | 
| 
 | 
public getEmailPlaceholderKey($key, $default = ""):string| Name | Type | Description | 
| 
 | ||
| 
 | 
PluginSeoSitemapService
The PluginSeoSitemapService collect the sitemap patterns.
Namespace
Plenty\Modules\Plugin\Services
Methods
public loadPatterns($url, $headers = []):bool| Name | Type | Description | 
| 
 | ||
| 
 | 
public getPatterns():arraypublic setItemPattern($pattern):void| Name | Type | Description | 
| 
 | 
public setBlogPattern($pattern):void| Name | Type | Description | 
| 
 | 
public setBlogContent($data):void| Name | Type | Description | 
| 
 | 
public setContentCategoryPattern($pattern):void| Name | Type | Description | 
| 
 | 
public setItemCategoryPattern($pattern):void| Name | Type | Description | 
| 
 | 
public getItemPattern():stringpublic getBlogPattern():stringpublic getBlogContent():arraypublic getItemCategoryPattern():stringpublic getContentCategoryPattern():stringDataBase
Annotations
Index
Namespace
Plenty\Modules\Plugin\DataBase\Annotations
Methods
public toArray()Returns this model as an array.
NonTableAttribute
Namespace
Plenty\Modules\Plugin\DataBase\Annotations
Methods
public toArray()Returns this model as an array.
Contracts
CriteriaQuery
database query
Namespace
Plenty\Modules\Plugin\DataBase\Contracts
Methods
public where($fieldName, $operator = null, $value = null):Plenty\Modules\Plugin\DataBase\Contracts\CriteriaQueryReturn type:        CriteriaQuery
Add a basic where clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public whereIn($fieldName, $values, $boolean = "and", $not = false):Plenty\Modules\Plugin\DataBase\Contracts\CriteriaQueryReturn type:        CriteriaQuery
Add a "where in" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public orWhereIn($fieldName, $values):Plenty\Modules\Plugin\DataBase\Contracts\CriteriaQueryReturn type:        CriteriaQuery
Add an "or where in" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public orWhere($fieldName, $operator = null, $value = null):Plenty\Modules\Plugin\DataBase\Contracts\CriteriaQueryReturn type:        CriteriaQuery
Add an "or where" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public whereNull($fieldName, $boolean = "and", $not = false):Plenty\Modules\Plugin\DataBase\Contracts\CriteriaQueryReturn type:        CriteriaQuery
Add a "where null" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public orWhereNull($fieldName):voidAdd an "or where null" clause to the query.
| Name | Type | Description | 
| 
 | 
public having($fieldName, $operator = null, $value = null, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\CriteriaQueryReturn type:        CriteriaQuery
Add a "having" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public orHaving($fieldName, $operator = null, $value = null):voidAdd a "or having" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public whereHas($modelName, $callback = null, $operator = ">=", $count = 1):void| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public join($firstModelName, $callback, $as = ""):voidAdd a join clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public leftJoin($firstModelName, $callback):voidAdd a left join to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | 
DataBase
Database contract
Namespace
Plenty\Modules\Plugin\DataBase\Contracts
Methods
public save($model):Plenty\Modules\Plugin\DataBase\Contracts\ModelReturn type:        Model
| Name | Type | Description | 
| 
 | 
public find($modelClassName, $primaryKeyFieldValue):Plenty\Modules\Plugin\DataBase\Contracts\ModelReturn type:        Model
| Name | Type | Description | 
| 
 | ||
| 
 | 
public query($modelClassName):Plenty\Modules\Plugin\DataBase\Contracts\QueryJoinClauseQuery
database join query
Namespace
Plenty\Modules\Plugin\DataBase\Contracts
Methods
public on($firstModelName, $first, $operator = null, $secondModelName = null, $second = null, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\JoinClauseQueryReturn type:        JoinClauseQuery
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public where($modelName, $column, $operator = null, $value = null, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\JoinClauseQueryReturn type:        JoinClauseQuery
Add a basic where clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public orWhere($modelName, $column, $operator = null, $value = null):Plenty\Modules\Plugin\DataBase\Contracts\JoinClauseQueryReturn type:        JoinClauseQuery
Add an "or where" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public whereNull($modelName, $column, $boolean = "and", $not = false):Plenty\Modules\Plugin\DataBase\Contracts\JoinClauseQueryReturn type:        JoinClauseQuery
Add a "where null" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public orWhereNull($modelName, $column):Plenty\Modules\Plugin\DataBase\Contracts\JoinClauseQueryReturn type:        JoinClauseQuery
Add an "or where null" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | 
Model
Database model
Namespace
Plenty\Modules\Plugin\DataBase\Contracts
| Name | Type | Description | 
|---|---|---|
| primaryKeyFieldName | ||
| primaryKeyFieldType | ||
| autoIncrementPrimaryKey | ||
| textFields | ||
| attributes | ||
| original | ||
| changes | ||
| casts | ||
| dates | ||
| dateFormat | ||
| mutatorCache | 
Methods
public getTableName():stringpublic attributesToArray():arrayConvert the model's attributes to an array.
public getAttribute($key):voidGet an attribute from the model.
| Name | Type | Description | 
| 
 | 
public getAttributeValue($key):voidGet a plain attribute
| Name | Type | Description | 
| 
 | 
public getAttributeFromArray($key):voidGet an attribute from the $attributes array.
| Name | Type | Description | 
| 
 | 
public hasGetMutator($key):boolDetermine if a get mutator exists for an attribute.
| Name | Type | Description | 
| 
 | 
public mutateAttribute($key, $value):voidGet the value of an attribute using its mutator.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public mutateAttributeForArray($key, $value):voidGet the value of an attribute using its mutator for array conversion.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public setAttribute($key, $value):Plenty\Modules\Plugin\DataBase\Contracts\ModelReturn type:        Model
Set a given attribute on the model.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public hasSetMutator($key):boolDetermine if a set mutator exists for an attribute.
| Name | Type | Description | 
| 
 | 
public fillJsonAttribute($key, $value):Plenty\Modules\Plugin\DataBase\Contracts\ModelReturn type:        Model
Set a given JSON attribute on the model.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public fromJson($value, $asObject = false):voidDecode the given JSON back into an array or object.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public fromDateTime($value):stringConvert a DateTime to a storable string.
| Name | Type | Description | 
| 
 | 
public getDates():arrayGet the attributes that should be converted to dates.
public setDateFormat($format):Plenty\Modules\Plugin\DataBase\Contracts\ModelReturn type:        Model
Set the date format used by the model.
| Name | Type | Description | 
| 
 | 
public hasCast($key, $types = null):boolDetermine whether an attribute should be cast to a native type.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public getCasts():arrayGet the casts array.
public getAttributes():arrayGet all of the current attributes on the model.
public setRawAttributes($attributes, $sync = false):Plenty\Modules\Plugin\DataBase\Contracts\ModelReturn type:        Model
Set the array of model attributes. No checking is done.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public getOriginal($key = null, $default = null):voidGet the model's original attribute values.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public only($attributes):arrayGet a subset of the model's attributes.
| Name | Type | Description | 
| 
 | 
public syncOriginal():Plenty\Modules\Plugin\DataBase\Contracts\ModelReturn type:        Model
Sync the original attributes with the current.
public syncOriginalAttribute($attribute):Plenty\Modules\Plugin\DataBase\Contracts\ModelReturn type:        Model
Sync a single original attribute with its current value.
| Name | Type | Description | 
| 
 | 
public syncChanges():Plenty\Modules\Plugin\DataBase\Contracts\ModelReturn type:        Model
Sync the changed attributes.
public isDirty($attributes = null):boolDetermine if the model or given attribute(s) have been modified.
| Name | Type | Description | 
| 
 | 
public isClean($attributes = null):boolDetermine if the model or given attribute(s) have remained the same.
| Name | Type | Description | 
| 
 | 
public wasChanged($attributes = null):boolDetermine if the model or given attribute(s) have been modified.
| Name | Type | Description | 
| 
 | 
public getDirty():arrayGet the attributes that have been changed since last sync.
public getChanges():arrayGet the attributes that were changed.
public getMutatedAttributes():arrayGet the mutated attributes for a given instance.
public static cacheMutatedAttributes($class):voidExtract and cache all the mutated attributes of a class.
| Name | Type | Description | 
| 
 | 
public relationLoaded():voidQuery
database query
Namespace
Plenty\Modules\Plugin\DataBase\Contracts
Methods
public select($columns = []):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a basic select clause to the query.
| Name | Type | Description | 
| 
 | 
public where($fieldName, $operator = null, $value = null):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a basic where clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public whereIn($fieldName, $values, $boolean = "and", $not = false):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a "where in" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public orWhereIn($fieldName, $values):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add an "or where in" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public orWhere($fieldName, $operator = null, $value = null):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add an "or where" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public whereNull($fieldName, $boolean = "and", $not = false):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a "where null" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public orWhereNull($fieldName):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add an "or where null" clause to the query.
| Name | Type | Description | 
| 
 | 
public whereBetween($column, $values, $boolean = "and", $not = false):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a where between statement to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public whereNotBetween($column, $values, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a where not between statement to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public whereDate($column, $operator, $value = null, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a "where date" statement to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public whereMonth($column, $operator, $value = null, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a "where month" statement to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public whereDay($column, $operator, $value = null, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a "where day" statement to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public whereYear($column, $operator, $value = null, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a "where year" statement to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public whereTime($column, $operator, $value = null, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a "where time" statement to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public whereNested($callback):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Create a nested where condition
| Name | Type | Description | 
| 
 | 
public groupBy($groups):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a "group by" statement to the query.
| Name | Type | Description | 
| 
 | 
public having($fieldName, $operator = null, $value = null, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a "having" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public orHaving($fieldName, $operator = null, $value = null):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add a "or having" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public orderBy($fieldName, $direction = "asc"):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Add an "order by" clause to the query.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public forPage($page, $perPage = 15):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Set the limit and offset for a given page.
| Name | Type | Description | 
| 
 | ||
| 
 | 
public count($columns = "*"):intRetrieve the "count" result of the query.
| Name | Type | Description | 
| 
 | 
public limit($value):Plenty\Modules\Plugin\DataBase\Contracts\QueryReturn type:        Query
Set the "limit" value of the query.
| Name | Type | Description | 
| 
 | 
public offset($value):Plenty\Modules\Plugin\DataBase\Contracts\QueryDynamoDb
Contracts
DynamoDbRepositoryContract
AWS DynamoDb Repository (Deprecated)
| Deprecated! (since 2017-06-30) Please use Plenty\Modules\Plugin\DataBase\Contracts\DataBase instead | 
Namespace
Plenty\Modules\Plugin\DynamoDb\Contracts
Methods
public createTable($pluginName, $tableName, $attributeDefinitions, $keySchema, $readCapacityUnits = 3, $writeCapacityUnits = 2):bool| Deprecated! (since 2017-06-30) Please use Plenty\Modules\Plugin\DataBase\Contracts\DataBase instead | 
Create a table
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public updateTable($pluginName, $tableName, $readCapacityUnits = 3, $writeCapacityUnits = 2):bool| Deprecated! (since 2017-06-30) Please use Plenty\Modules\Plugin\DataBase\Contracts\DataBase instead | 
Update a table
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | ||
| 
 | ||
| 
 | 
public putItem($pluginName, $tableName, $item):bool| Deprecated! (since 2017-06-30) Please use Plenty\Modules\Plugin\DataBase\Contracts\DataBase instead | 
Add item to table
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | ||
| 
 | 
public getItem($pluginName, $tableName, $consistentRead, $key):array| Deprecated! (since 2017-06-30) Please use Plenty\Modules\Plugin\DataBase\Contracts\DataBase instead | 
Retrieving items
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | ||
| 
 | ||
| 
 | 
public deleteItem($pluginName, $tableName, $key):bool| Deprecated! (since 2017-06-30) Please use Plenty\Modules\Plugin\DataBase\Contracts\DataBase instead | 
Delete an item
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | ||
| 
 | 
public deleteTable($pluginName, $tableName):bool| Deprecated! (since 2017-06-30) Please use Plenty\Modules\Plugin\DataBase\Contracts\DataBase instead | 
Deleting a table
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | 
public scan($pluginName, $tableName, $returnFields = "", $expressionAttributeValues = [], $filterExpression = "", $limit):void| Deprecated! (since 2017-06-30) Please use Plenty\Modules\Plugin\DataBase\Contracts\DataBase instead | 
A scan operation scans the entire table. You can specify filters to apply to the results to refine the values returned to you, after the complete scan. Amazon DynamoDB puts a 1MB limit on the scan (the limit applies before the results are filtered).
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | is taken into account when value greater than 0 | 
PluginSet
Contracts
PluginSetEntryRepositoryContract
get, create, update or delete plugin set entries
Namespace
Plenty\Modules\Plugin\PluginSet\Contracts
Methods
public get($idOrInstance):Plenty\Modules\Plugin\PluginSet\Models\PluginSetEntryReturn type:        PluginSetEntry
Get a PluginSetEntry.
| Name | Type | Description | 
| 
 | The Id of the PluginSetEntry to retrieve or the PluginSetEntry object itself. | 
public getByPluginSetIdAndPluginId($pluginSetId, $pluginId):Plenty\Modules\Plugin\PluginSet\Models\PluginSetEntryReturn type:        PluginSetEntry
Get a PluginSetEntry using a PluginSetId and PluginId
| Name | Type | Description | 
| 
 | The id of the PluginSet for the PluginSetEntry which should be retrieved. | |
| 
 | The id of the Plugin for the PluginSetEntry which should be retrieved. | 
public create($data):Plenty\Modules\Plugin\PluginSet\Models\PluginSetEntryReturn type:        PluginSetEntry
Create a set entry.
| Name | Type | Description | 
| 
 | Must contain a 'pluginId' field and a 'pluginSetId' field to specify which plugin should be associated with which plugin set in the newly created set entry: ['pluginId' ⇒ 5, 'pluginSetId' ⇒ 3] | 
public copyToPluginSet($pluginSetEntryOrId, $pluginSetOrId, $copyConfigurations):Plenty\Modules\Plugin\PluginSet\Models\PluginSetEntryReturn type:        PluginSetEntry
Copy a PluginSetEntry to a PluginSet
| Name | Type | Description | 
| 
 | The id of the PluginSetEntry that should be copied, or the PluginSetEntry object itself | |
| 
 | The id of the PluginSet the entry should be copied to, or the PluginSet object itself | |
| 
 | true if the configurations related to the set entry should also be copied, false if not | 
public update($id, $data):boolUpdate a PluginSetEntry. Associate a set entry with a new set, a new plugin, or both.
| Name | Type | Description | 
| 
 | The id of the set entry to update | |
| 
 | Must contain EITHER a 'pluginId' field OR a 'pluginSetId' field OR both. | 
public delete($what):intDelete a PluginSetEntry
| Name | Type | Description | 
| 
 | The PluginSetEntry object to delete or a PluginSetEntry-Id | 
PluginSetRepositoryContract
list, create, update or delete plugin sets
Namespace
Plenty\Modules\Plugin\PluginSet\Contracts
Methods
public count():intCount current plugin sets.
public create($data):Plenty\Modules\Plugin\PluginSet\Models\PluginSetReturn type:        PluginSet
Create a plugin set. The data array has to contain a 'name' field. Throws a 'TooManyPluginSetsException' if the maximum number of sets is exceeded.
| Name | Type | Description | 
| 
 | The data for the newly created plugin set. Only the 'name' field is required: ['name' ⇒ 'MyNewPluginSet']. | 
public copy($data):Plenty\Modules\Plugin\PluginSet\Models\PluginSetReturn type:        PluginSet
Copy a plugin set. All set entries from the source set will be copied into the new set.
| Name | Type | Description | 
| 
 | Has to contain the Id of the plugin set to copy from and the name for the new set: ['copyPluginSetId' ⇒ 12, 'name' ⇒ 'NewSetWithCopiedEntries']. | 
public update($id, $data):Plenty\Modules\Plugin\PluginSet\Models\PluginSetReturn type:        PluginSet
Update a set. Only the 'name' field can be updated.
| Name | Type | Description | 
| 
 | Id of the plugin set to update | |
| 
 | Update data must only contain a 'name' field: ['name' ⇒ 'NewNameForMySet'] | 
public delete($what):intDelete a set.
| Name | Type | Description | 
| 
 | The PluginSet object to delete or a PluginSet-Id | 
public get($pluginSetOrId):Plenty\Modules\Plugin\PluginSet\Models\PluginSetReturn type:        PluginSet
Get a plugin set.
| Name | Type | Description | 
| 
 | The Id of the plugin set to retrieve from the database. If a PluginSet object is passed instead of an integer, the object is returned without change. | 
public list():voidList all plugin sets.
public listSetEntries($id):voidList all set entries of a plugin set.
| Name | Type | Description | 
| 
 | The Id of the plugin set to list the entries from. | 
public listWebstores($id):voidList all webstores a plugin set is related to.
| Name | Type | Description | 
| 
 | The Id of the set in question | 
public listLayoutContainers($id):voidList all LayoutContainers for a plugin set.
| Name | Type | Description | 
| 
 | The Id of the plugin set in question | 
public getOrCreatePluginSetEntry($id, $pluginId, $withTrashed = false, $resetCache = true):Plenty\Modules\Plugin\PluginSet\Models\PluginSetEntryReturn type:        PluginSetEntry
Get the PluginSetEntry object containing a specific plugin for a set. If a PluginSetEntry does not exist, it will be created.
| Name | Type | Description | 
| 
 | The Id of the plugin set in question | |
| 
 | The Id of the plugin in question | |
| 
 | If true, deleted PluginSetEntries will be included. Default is false. | |
| 
 | 
public changePluginActiveStatusForSet($pluginSetId, $pluginId, $active):Plenty\Modules\Plugin\Models\PluginReturn type:        Plugin
Activates / deactivates a plugin for a set by trashing or restoring the respective set entry.
| Name | Type | Description | 
| 
 | The id of the plugin set in question | |
| 
 | The id of the plugin in question | |
| 
 | true if the plugin should be activated for the set, false if it should be deactivated. | 
public removePluginFromSet($setId, $pluginId):Plenty\Modules\Plugin\Models\PluginReturn type:        Plugin
| Name | Type | Description | 
| 
 | The Id of the plugin set in question | |
| 
 | The Id of the plugin that should be removed from the set. | 
public createPreviewHash($setId):stringCreate a preview hash for a plugin set.
| Name | Type | Description | 
| 
 | The plugin set in question | 
public getPreviewPluginSetId($previewHash):voidExtract a plugin set id from a preview hash.
| Name | Type | Description | 
| 
 | The preview has to extract the plugin set id from | 
public installGitPlugin($setId, $pluginId, $requestData):boolInstall a git-plugin into a set.
| Name | Type | Description | 
| 
 | The Id of the plugin set to install the plugin into | |
| 
 | The Id of the (git-) plugin that should be installed into the set | |
| 
 | Must contain a 'branch' field that specifies the branch that should be installed: ['branch' ⇒ 'stable'] | 
public setPosition($setId, $pluginId, $requestData):voidChange the position of a plugin in a set
| Name | Type | Description | 
| 
 | The id of the plugin set in question | |
| 
 | The id of the plugin of which the position should be changed | |
| 
 | Must contain a 'position' field with an integer specifying the new position: ['position' ⇒ 99] | 
public getSyncState($pluginSetId):boolGet the sync state, to determine if Plugins have been (de-)activated since last build.
| Name | Type | Description | 
| 
 | The id of the PluginSet | 
public getPluginSetHash($pluginSetOrId):string| Name | Type | Description | 
| 
 | 
public getPluginSetIdFromHash($pluginSetHash):int| Name | Type | Description | 
| 
 | 
public getCurrentPluginSetId():intGet the PluginSetID of the currently running plugin.
Models
PluginSet
Eloquent model representing a PluginSet.
Namespace
Plenty\Modules\Plugin\PluginSet\Models
| Name | Type | Description | 
|---|---|---|
| id | ||
| hash | ||
| hasSuccessfulBuild | ||
| parentPluginSetId | ||
| parentPluginSet | ||
| name | ||
| description | ||
| developmentMode | ||
| lastBuild | ||
| pluginSetEntries | ||
| pluginSetEntriesWithTrashed | ||
| layoutContainers | ||
| webstores | 
Methods
public toArray()Returns this model as an array.
Storage
Contracts
StorageRepositoryContract
Storage Repository
Namespace
Plenty\Modules\Plugin\Storage\Contracts
Methods
public uploadObject($pluginName, $key, $body, $publicVisible = false, $metaData = []):Plenty\Modules\Cloud\Storage\Models\StorageObjectReturn type:        StorageObject
Create an object with content in $body
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | e.g. myDir/x/y/z/HelloWorld.txt | |
| 
 | file content | |
| 
 | ||
| 
 | 
public getObject($pluginName, $key, $publicVisible = false):Plenty\Modules\Cloud\Storage\Models\StorageObjectReturn type:        StorageObject
Get an object
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | e.g. myDir/x/y/z/HelloWorld.txt | |
| 
 | 
public getObjectUrl($pluginName, $key, $publicVisible = false, $minutesToExpire = 5):stringReturns the URL to an object identified by its bucket and key. The URL will be signed and set to expire at the provided time.
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | e.g. myDir/x/y/z/HelloWorld.txt | |
| 
 | ||
| 
 | Minutes between 1 and 15 | 
public getObjectAsTemporaryFileResource($pluginName, $key, $publicVisible = false):stringGet local file resource of an object. Use this if it is really necessary! Using getObject is the normal and effective way.
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | e.g. myDir/x/y/z/HelloWorld.txt | |
| 
 | 
public doesObjectExist($pluginName, $key, $publicVisible = false):boolChecks if object exists
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | e.g. myDir/x/y/z/HelloWorld.txt | |
| 
 | 
public deleteObject($pluginName, $key, $publicVisible = false):boolExecutes the DeleteObject operation.
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | myDir/HelloWorld.txt | |
| 
 | 
public listObjects($pluginName, $prefix = "", $limit, $startKey = "", $continuationToken = "", $publicVisible = false, $resultKeyWithoutPrefix = true):Plenty\Modules\Cloud\Storage\Models\StorageObjectListReturn type:        StorageObjectList
Returns some or all (up to 1000) objects
| Name | Type | Description | 
| 
 | name of your plugin | |
| 
 | Limits the response to keys that begin with the specified prefix. | |
| 
 | The total number of items to return. | |
| 
 | is where you want to start listing from. $startKey can be any key in the bucket. | |
| 
 | indicates that the list is being continued on this bucket with a token. | |
| 
 | ||
| 
 | 
public getPluginZip($pluginSetId, $pluginName):voidGet all objects of a plugin as zip file
| Name | Type | Description | 
| 
 | ||
| 
 | 
VersionControl
Models
Git
Model holding plugin data concerning Git version control.
Namespace
Plenty\Modules\Plugin\VersionControl\Models
| Name | Type | Description | 
|---|---|---|
| id | git id | |
| pluginId | plugin id | |
| username | username for remote account | |
| password | password for remote account | |
| remoteUrl | url for remote repository | |
| branch | actual selected branch | |
| autoFetch | automatically fetch from remote repository | |
| webhookToken | token needed for development | |
| createdAt | created timestamp | |
| updatedAt | last update timestamp | |
| plugin | 
Methods
public toArray()Returns this model as an array.