- Required
- Type:
Array\Closure
SCP uses a Filter to evaluate if a Material Type can be chosen by the User.
todo
Config Key: material_types
TIP
Depending on your screen size, beware that you can scroll left/right to see more of the included document.
<?php
use App\Models\Config\MaterialType;
// CLIENT_CONFIG/config/material_types.php
return [
/**
* Every Material Type needs to have a unique name
*
* @var string
* @required
*/
'unique-name-of-a-material-type' => [
/**
* For Description see below
* @todo remove me
*/
'filter' => [],
/**
* Definition of the Material Types is grouped inside "type"
*/
'type' => [
/**
* For Description see below
* @todo remove me
*/
'channel' => MaterialType::MATERIAL_CHANNEL_INSTANT_MSG,
/**
* For Description see below
* @todo remove me
*/
'channel_icon' => MaterialType::MATERIAL_ICON_INSTANT_MSG,
/**
* The full qualified name for the material type.
* It is used to identify materials lazily as targets for copying
*
* @var string
* @required
* @todo remove me to down below
*/
'fqn' => 'fancy.awesome.instant.message',
/**
* Contains a list of FQNs which are supported to be sources for copying material data.
* * (stars) are used as placeholders.
*
* @var array
* @default []
* @todo remove me to down below
*/
'supported_material_types' => [
'*.awesome.instant.message',
],
/**
* The name of this Material Type, which is also displayed in the SCPs GUI
*
* @var array
* @required
* @todo remove me to down below
*/
'label' => 'Fancy Instant Message',
/**
* For Description see below
* @todo remove me
*/
'group' => MaterialType::MATERIAL_GROUP_INSTANT_MSG,
/**
* The URI to load the content app from.
*
* Can also be a local file:// url which is resolved using the relative path
* inside a storage/material-types/ folder of a CLIENT_CONFIG repository, but
* only useful for local development, as hosting within SCP is deprecated.
*
* The URL has to host at least an index.html file and a thumbnail.png file.
*
* @var string
* @required
* @todo remove me to down below
*/
'template' => 'rmh-test/ae-fragment/',
/**
* As Material Types need to be persistent we cannot really delete a Material Type unless
* we do not have any Material in the Database present.
*
* Set disabled to true to prevent people from using it
*
* @var bool
* @default false
* @todo remove me to down below
*/
'disabled' => false,
/**
* If this is set to false, the Paperclip icon which allow uploading extra content will be disabled
*
* @var bool
* @default true
* @todo remove me to down below
*/
'showFileListButton' => true,
/**
* If set to false, the Briefing is intended to be a "application" and the briefing library which
* enable "data-sc2-editable" functions will not be included.
*
* @deprecated dont use this anymore, use "type" instead
* @default false
* @todo remove me to down below
*/
'disableEditor' => false,
/**
* Can contain "simple_briefing" or "application". Sets the type of the briefing.
*
* Type: simple_briefing
* Will load the sc2-data-editable library which will spin up editor based on HTML data attributes.
*
* Type: application
* Will not load the data library but only the briefing and showcase API to interact with the host
* system.
*
* @var string
* @enum simple_briefing|application
* @default 'simple_briefing'
* @todo remove me to down below
*/
'type' => 'simple_briefing',
],
],
// ...
];
?>
{$key}.filterArray \ClosureSCP uses a Filter to evaluate if a Material Type can be chosen by the User.
MISSING {$key}.type DEFINITION
todo
{$key}.type.channelStringThe Material Channel is used in the Front End as an additional visual filter option, so that Users first need to select their Marketing Channel they want to proceed in, to reach this Material Type.
We expect everyone to follow this normalized approach as we validate it on import.
If there are types missing, we will think about adding more.
| Constant | Value |
|---|---|
| MATERIAL_CHANNEL_MISC | misc |
| MATERIAL_CHANNEL_EMAIL_HTML | email_template_fragments |
| MATERIAL_CHANNEL_CLM_PPTX | clm_presentations |
| MATERIAL_CHANNEL_INSTANT_MSG | instant_messaging |
As you might have noticed, these are the same as within the Material Channel Configuration.
{$key}.type.channel_iconStringThe Channel Type Icon is used to distinct one Material Type Group from another and to make it easier recognizable. Currently, you can only set one of our defined icons and not set any image's data string.
| Constant | Value |
|---|---|
| MATERIAL_ICON_ADOBE_EMAIL | adobe_emails |
| MATERIAL_ICON_INSTANT_MSG | instant_messages |
| MATERIAL_ICON_OTHERS_ENVELOPE | others_envelopes |
| MATERIAL_ICON_VEEVA_CLM | veeva_clm |
| MATERIAL_ICON_VEEVA_EMAIL | veeva_email_fragments |
{$key}.type.groupStringMultiple Material Types need to be grouped by a Material Type Group Name.
You can choose a Material Type Group on your own. However, there are already a bunch of Material Type Groups
we encountered over the time.
For those Material Type Groups there are a bunch of constants you can choose from to use.
| Constant | Value |
|---|---|
| MATERIAL_GROUP_ADOBE_CAMPAIGN | Adobe Campaign Template |
| MATERIAL_GROUP_B_MAIL | bMail Template |
| MATERIAL_GROUP_INSTANT_MSG | Instant Message |
| MATERIAL_GROUP_OCE_MAIL | OCE E-Mail Template |
| MATERIAL_GROUP_VEEVA_CLM | CLM Presentation |
| MATERIAL_GROUP_VEEVA_EMAIL_FRAGMENT | Veeva Approved Email Fragment |
| MATERIAL_GROUP_VEEVA_EMAIL_TEMPLATE | Veeva Approved Email Template |
| MATERIAL_GROUP_VEEVA_EMAIL_TEMPLATE_FRAGMENT | Veeva Approved Email Template-Fragment |
| MATERIAL_GROUP_WEB_PAGE | Webpage Article |
MISSING ADDITIONAL {$key}.type.* DEFINITIONS
todo
{$key}.type.templateStringSCP uses the configured URI to start the content app and to download the thumbnail.png file.
If you use a file:// protocol, SCP tries to resolve the path based on the torage/material-types/ folder of the CLIENT_CONFIG repository.
You can also pass GET parameters with the given URL by just adding them here.
Production and Staging
Content App URLs may contain the %stage% variable which will be replaced by SCP.
If you, e.g., use https://my-website.com/fancy-instant-message/%stage%/ the %stage%
will be replaced by either production or staging – depending on which
system/stage/tier/environment you are viewing the Content App.