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\Plugin
Return type: Plugin
Name |
Type |
Description |
|
public searchPlugins($params = [], $itemsPerPage = \Plenty\Modules\Plugin\Models\Plugin::DEFAULT_ITEMS_PER_PAGE):Plenty\Repositories\Models\PaginatedResult
Return 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\Plugin
Events
AfterBuildPlugins
Event after plugin build has finished
Namespace
Plenty\Modules\Plugin\Events
Methods
public getPluginSet():Plenty\Modules\Plugin\PluginSet\Models\PluginSet
Return type: PluginSet
Get the plugin set which have been built
public sourceHasChanged($pluginName):bool
Check if php files of a plugin have been changed
Name |
Type |
Description |
|
public resourcesHasChanged($pluginName):bool
Check if resource files of a plugin have been changed
Name |
Type |
Description |
|
public broadcastAs():void
public broadcastPayload():void
public getWebstoreId():void
public broadcastWhen():void
public broadcastConnections():void
public broadcastOn():void
public broadcastWith():void
AfterCodeUpdate
Event after a plugin file was updated.
Namespace
Plenty\Modules\Plugin\Events
Methods
public getPluginSetId():int
public getPluginId():int
Models
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 |
||
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():bool
public setStatus($status):void
Name |
Type |
Description |
|
public isInitialized():bool
public setInitialized($initialized):void
Name |
Type |
Description |
|
public getEmailPlaceholder():array
public 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):bool
Name |
Type |
Description |
|
public getPatterns():array
public 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():string
public getBlogPattern():string
public getBlogContent():array
public getItemCategoryPattern():string
public getContentCategoryPattern():string
DataBase
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\CriteriaQuery
Return 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\CriteriaQuery
Return type: CriteriaQuery
Add a "where in" clause to the query.
Name |
Type |
Description |
|
||
|
||
|
||
|
public orWhereIn($fieldName, $values):Plenty\Modules\Plugin\DataBase\Contracts\CriteriaQuery
Return 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\CriteriaQuery
Return 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\CriteriaQuery
Return type: CriteriaQuery
Add a "where null" clause to the query.
Name |
Type |
Description |
|
||
|
||
|
public orWhereNull($fieldName):void
Add 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\CriteriaQuery
Return type: CriteriaQuery
Add a "having" clause to the query.
Name |
Type |
Description |
|
||
|
||
|
||
|
public orHaving($fieldName, $operator = null, $value = null):void
Add 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 = ""):void
Add a join clause to the query.
Name |
Type |
Description |
|
||
|
||
|
public leftJoin($firstModelName, $callback):void
Add 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\Model
Return type: Model
Name |
Type |
Description |
|
public find($modelClassName, $primaryKeyFieldValue):Plenty\Modules\Plugin\DataBase\Contracts\Model
Return type: Model
Name |
Type |
Description |
|
||
|
public query($modelClassName):Plenty\Modules\Plugin\DataBase\Contracts\Query
JoinClauseQuery
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\JoinClauseQuery
Return type: JoinClauseQuery
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
public where($modelName, $column, $operator = null, $value = null, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\JoinClauseQuery
Return 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\JoinClauseQuery
Return 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\JoinClauseQuery
Return type: JoinClauseQuery
Add a "where null" clause to the query.
Name |
Type |
Description |
|
||
|
||
|
||
|
public orWhereNull($modelName, $column):Plenty\Modules\Plugin\DataBase\Contracts\JoinClauseQuery
Return 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():string
public attributesToArray():array
Convert the model's attributes to an array.
public getAttribute($key):void
Get an attribute from the model.
Name |
Type |
Description |
|
public getAttributeValue($key):void
Get a plain attribute
Name |
Type |
Description |
|
public getAttributeFromArray($key):void
Get an attribute from the $attributes array.
Name |
Type |
Description |
|
public hasGetMutator($key):bool
Determine if a get mutator exists for an attribute.
Name |
Type |
Description |
|
public mutateAttribute($key, $value):void
Get the value of an attribute using its mutator.
Name |
Type |
Description |
|
||
|
public mutateAttributeForArray($key, $value):void
Get the value of an attribute using its mutator for array conversion.
Name |
Type |
Description |
|
||
|
public setAttribute($key, $value):Plenty\Modules\Plugin\DataBase\Contracts\Model
Return type: Model
Set a given attribute on the model.
Name |
Type |
Description |
|
||
|
public hasSetMutator($key):bool
Determine if a set mutator exists for an attribute.
Name |
Type |
Description |
|
public fillJsonAttribute($key, $value):Plenty\Modules\Plugin\DataBase\Contracts\Model
Return type: Model
Set a given JSON attribute on the model.
Name |
Type |
Description |
|
||
|
public fromJson($value, $asObject = false):void
Decode the given JSON back into an array or object.
Name |
Type |
Description |
|
||
|
public fromDateTime($value):string
Convert a DateTime to a storable string.
Name |
Type |
Description |
|
public getDates():array
Get the attributes that should be converted to dates.
public setDateFormat($format):Plenty\Modules\Plugin\DataBase\Contracts\Model
Return type: Model
Set the date format used by the model.
Name |
Type |
Description |
|
public hasCast($key, $types = null):bool
Determine whether an attribute should be cast to a native type.
Name |
Type |
Description |
|
||
|
public getCasts():array
Get the casts array.
public getAttributes():array
Get all of the current attributes on the model.
public setRawAttributes($attributes, $sync = false):Plenty\Modules\Plugin\DataBase\Contracts\Model
Return type: Model
Set the array of model attributes. No checking is done.
Name |
Type |
Description |
|
||
|
public getOriginal($key = null, $default = null):void
Get the model's original attribute values.
Name |
Type |
Description |
|
||
|
public only($attributes):array
Get a subset of the model's attributes.
Name |
Type |
Description |
|
public syncOriginal():Plenty\Modules\Plugin\DataBase\Contracts\Model
Return type: Model
Sync the original attributes with the current.
public syncOriginalAttribute($attribute):Plenty\Modules\Plugin\DataBase\Contracts\Model
Return type: Model
Sync a single original attribute with its current value.
Name |
Type |
Description |
|
public syncChanges():Plenty\Modules\Plugin\DataBase\Contracts\Model
Return type: Model
Sync the changed attributes.
public isDirty($attributes = null):bool
Determine if the model or given attribute(s) have been modified.
Name |
Type |
Description |
|
public isClean($attributes = null):bool
Determine if the model or given attribute(s) have remained the same.
Name |
Type |
Description |
|
public wasChanged($attributes = null):bool
Determine if the model or given attribute(s) have been modified.
Name |
Type |
Description |
|
public getDirty():array
Get the attributes that have been changed since last sync.
public getChanges():array
Get the attributes that were changed.
public getMutatedAttributes():array
Get the mutated attributes for a given instance.
public static cacheMutatedAttributes($class):void
Extract and cache all the mutated attributes of a class.
Name |
Type |
Description |
|
public relationLoaded():void
Query
database query
Namespace
Plenty\Modules\Plugin\DataBase\Contracts
Methods
public select($columns = []):Plenty\Modules\Plugin\DataBase\Contracts\Query
Return 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\Query
Return 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\Query
Return type: Query
Add a "where in" clause to the query.
Name |
Type |
Description |
|
||
|
||
|
||
|
public orWhereIn($fieldName, $values):Plenty\Modules\Plugin\DataBase\Contracts\Query
Return 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\Query
Return 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\Query
Return type: Query
Add a "where null" clause to the query.
Name |
Type |
Description |
|
||
|
||
|
public orWhereNull($fieldName):Plenty\Modules\Plugin\DataBase\Contracts\Query
Return 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\Query
Return type: Query
Add a where between statement to the query.
Name |
Type |
Description |
|
||
|
||
|
||
|
public whereNotBetween($column, $values, $boolean = "and"):Plenty\Modules\Plugin\DataBase\Contracts\Query
Return 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\Query
Return 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\Query
Return 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\Query
Return 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\Query
Return 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\Query
Return type: Query
Add a "where time" statement to the query.
Name |
Type |
Description |
|
||
|
||
|
||
|
public whereNested($callback):Plenty\Modules\Plugin\DataBase\Contracts\Query
Return type: Query
Create a nested where condition
Name |
Type |
Description |
|
public groupBy($groups):Plenty\Modules\Plugin\DataBase\Contracts\Query
Return 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\Query
Return type: Query
Add a "having" clause to the query.
Name |
Type |
Description |
|
||
|
||
|
||
|
public orHaving($fieldName, $operator = null, $value = null):Plenty\Modules\Plugin\DataBase\Contracts\Query
Return type: Query
Add a "or having" clause to the query.
Name |
Type |
Description |
|
||
|
||
|
public orderBy($fieldName, $direction = "asc"):Plenty\Modules\Plugin\DataBase\Contracts\Query
Return type: Query
Add an "order by" clause to the query.
Name |
Type |
Description |
|
||
|
public forPage($page, $perPage = 15):Plenty\Modules\Plugin\DataBase\Contracts\Query
Return type: Query
Set the limit and offset for a given page.
Name |
Type |
Description |
|
||
|
public count($columns = "*"):int
Retrieve the "count" result of the query.
Name |
Type |
Description |
|
public limit($value):Plenty\Modules\Plugin\DataBase\Contracts\Query
Return type: Query
Set the "limit" value of the query.
Name |
Type |
Description |
|
public offset($value):Plenty\Modules\Plugin\DataBase\Contracts\Query
DynamoDb
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\PluginSetEntry
Return 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\PluginSetEntry
Return 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\PluginSetEntry
Return 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\PluginSetEntry
Return 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):bool
Update 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):int
Delete 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():int
Count current plugin sets.
public create($data):Plenty\Modules\Plugin\PluginSet\Models\PluginSet
Return 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\PluginSet
Return 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\PluginSet
Return 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):int
Delete a set.
Name |
Type |
Description |
|
The PluginSet object to delete or a PluginSet-Id |
public get($pluginSetOrId):Plenty\Modules\Plugin\PluginSet\Models\PluginSet
Return 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():void
List all plugin sets.
public listSetEntries($id):void
List all set entries of a plugin set.
Name |
Type |
Description |
|
The Id of the plugin set to list the entries from. |
public listWebstores($id):void
List all webstores a plugin set is related to.
Name |
Type |
Description |
|
The Id of the set in question |
public listLayoutContainers($id):void
List 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\PluginSetEntry
Return 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\Plugin
Return 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\Plugin
Return 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):string
Create a preview hash for a plugin set.
Name |
Type |
Description |
|
The plugin set in question |
public getPreviewPluginSetId($previewHash):void
Extract 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):bool
Install 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):void
Change 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):bool
Get 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():int
Get 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 |
||
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\StorageObject
Return 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\StorageObject
Return 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):string
Returns 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):string
Get 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):bool
Checks if object exists
Name |
Type |
Description |
|
name of your plugin |
|
|
e.g. myDir/x/y/z/HelloWorld.txt |
|
|
public deleteObject($pluginName, $key, $publicVisible = false):bool
Executes 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\StorageObjectList
Return 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):void
Get 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.