Skip to content

Commit

Permalink
Merge branch '10.2' into 10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mcop1 committed Dec 9, 2021
2 parents daca0c7 + 8c8bd87 commit 9edd80d
Show file tree
Hide file tree
Showing 49 changed files with 103 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,9 @@ pimcore.document.editables.areablock = Class.create(pimcore.document.area_abstra
}
}
}
menu.push(groupMenu);
if(groupMenu.menu.length) {
menu.push(groupMenu);
}
}
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,12 @@ pimcore.object.classes.klass = Class.create({
for (var i = 0; i < items.length; i++) {
var item = items[i];
if (typeof item.getValue == "function") {
this.data[item.name] = item.getValue();
let value = item.getValue();
if (typeof item.config.xtype !== 'undefined' && item.config.xtype === 'textfield') {
value = Ext.util.Format.htmlEncode(value);
}

this.data[item.name] = value;
}
}

Expand Down Expand Up @@ -705,6 +710,7 @@ pimcore.object.classes.klass = Class.create({
id: "iconfield-" + this.getId(),
name: "icon",
width: 396,
renderer: Ext.util.Format.htmlEncode,
value: this.data.icon,
listeners: {
"afterrender": function (el) {
Expand Down Expand Up @@ -752,6 +758,7 @@ pimcore.object.classes.klass = Class.create({
width: 500,
enableKeyEvents: true,
value: this.data.name,
renderer: Ext.util.Format.htmlEncode,
listeners: {
keyup: function (el) {
this.rootPanel.getComponent("phpClassName").setValue(getPhpClassName(el.getValue()))
Expand All @@ -763,12 +770,14 @@ pimcore.object.classes.klass = Class.create({
fieldLabel: t("description"),
name: "description",
width: 500,
renderer: Ext.util.Format.htmlEncode,
value: this.data.description
},
{
xtype: "textfield",
fieldLabel: t("unique_identifier"),
disabled: true,
renderer: Ext.util.Format.htmlEncode,
value: this.data.id,
width: 500
},
Expand All @@ -779,62 +788,71 @@ pimcore.object.classes.klass = Class.create({
itemId: "phpClassName",
width: 500,
disabled: true,
renderer: Ext.util.Format.htmlEncode,
value: getPhpClassName(this.data.name)
},
{
xtype: "textfield",
fieldLabel: t("parent_php_class"),
name: "parentClass",
width: 600,
renderer: Ext.util.Format.htmlEncode,
value: this.data.parentClass
},
{
xtype: "textfield",
width: 600,
name: "implementsInterfaces",
fieldLabel: t("implements_interfaces"),
renderer: Ext.util.Format.htmlEncode,
value: this.data.implementsInterfaces
},
{
xtype: "textfield",
fieldLabel: t("use_traits"),
name: "useTraits",
width: 600,
renderer: Ext.util.Format.htmlEncode,
value: this.data.useTraits
},
{
xtype: "textfield",
fieldLabel: t("listing_parent_php_class"),
name: "listingParentClass",
width: 600,
renderer: Ext.util.Format.htmlEncode,
value: this.data.listingParentClass
},
{
xtype: "textfield",
fieldLabel: t("listing_use_traits"),
name: "listingUseTraits",
width: 600,
renderer: Ext.util.Format.htmlEncode,
value: this.data.listingUseTraits
},
{
xtype: "textfield",
fieldLabel: t("link_generator_reference"),
name: "linkGeneratorReference",
width: 600,
renderer: Ext.util.Format.htmlEncode,
value: this.data.linkGeneratorReference
},
{
xtype: "textfield",
fieldLabel: t("preview_generator_reference"),
name: "previewGeneratorReference",
width: 600,
renderer: Ext.util.Format.htmlEncode,
value: this.data.previewGeneratorReference
},
{
xtype: "textfield",
fieldLabel: t("preview_url"),
name: "previewUrl",
width: 600,
renderer: Ext.util.Format.htmlEncode,
value: this.data.previewUrl
},
{
Expand Down Expand Up @@ -885,6 +903,7 @@ pimcore.object.classes.klass = Class.create({
fieldLabel: t("group"),
name: "group",
width: 600,
renderer: Ext.util.Format.htmlEncode,
value: this.data.group
},
this.allowInheritance,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ pimcore.object.classes.data.localizedfields = Class.create(pimcore.object.classe
fieldLabel: t('tab_position'),
name: 'tabPosition',
value: this.datax.tabPosition,
editable: false,
store: [['top', t('top')], ['left', t('left')], ['right', t('right')], ['bottom', t('bottom')]]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ pimcore.object.classes.layout.tabpanel = Class.create(pimcore.object.classes.lay
fieldLabel: t('tab_position'),
name: 'tabPosition',
value: this.datax.tabPosition,
editable: false,
store: [['top', t('top')], ['left', t('left')], ['right', t('right')], ['bottom', t('bottom')]]
}
]
});

return this.layout;
}
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* @method \Pimcore\Bundle\EcommerceFrameworkBundle\CartManager\Cart[] load()
* @method \Pimcore\Bundle\EcommerceFrameworkBundle\CartManager\Cart current()
* @method \Pimcore\Bundle\EcommerceFrameworkBundle\CartManager\Cart|false current()
* @method int getTotalCount()
* @method \Pimcore\Bundle\EcommerceFrameworkBundle\CartManager\Cart\Listing\Dao getDao()
* @method void setCartClass(string $cartClass)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* @method CartCheckoutData[] load()
* @method CartCheckoutData current()
* @method CartCheckoutData|false current()
* @method int getTotalCount()
* @method \Pimcore\Bundle\EcommerceFrameworkBundle\CartManager\CartCheckoutData\Listing\Dao getDao()
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* @method CartItemInterface[] load()
* @method CartItemInterface current()
* @method CartItemInterface|false current()
* @method int getTotalCount()
* @method int getTotalAmount()
* @method \Pimcore\Bundle\EcommerceFrameworkBundle\CartManager\CartItem\Listing\Dao getDao()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* Interface OrderListInterface
*
* @method OrderListItemInterface current()
* @method OrderListItemInterface|false current()
*/
interface OrderListInterface extends SeekableIterator, ArrayAccess, PaginateListingInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/**
* @method Rule[] load()
* @method Rule current()
* @method Rule|false current()
* @method \Pimcore\Bundle\EcommerceFrameworkBundle\PricingManager\Rule\Listing\Dao getDao()
*/
class Listing extends \Pimcore\Model\Listing\AbstractListing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/**
* @method Token[] load()
* @method Token current()
* @method Token|false current()
* @method int getTotalCount()
* @method \Pimcore\Bundle\EcommerceFrameworkBundle\VoucherService\Token\Listing\Dao getDao()
*/
Expand Down
5 changes: 4 additions & 1 deletion lib/Maintenance/Tasks/LogMailMaintenanceTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Pimcore\Db;
use Pimcore\Log\Handler\ApplicationLoggerDb;
use Pimcore\Maintenance\TaskInterface;
use Symfony\Component\Mime\Address;

/**
* @internal
Expand Down Expand Up @@ -86,7 +87,9 @@ public function execute()
$mail = new \Pimcore\Mail();
$mail->setIgnoreDebugMode(true);
$mail->html($html);
$mail->addTo($receivers);
foreach ($receivers as $receiver) {
$mail->addTo(new Address($receiver, $receiver));
}
$mail->setSubject('Error Log '.\Pimcore\Tool::getHostUrl());
$mail->send();
}
Expand Down
2 changes: 1 addition & 1 deletion models/Asset/Listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/**
* @method Model\Asset[] load()
* @method Model\Asset current()
* @method Model\Asset|false current()
* @method int getTotalCount()
* @method int getCount()
* @method int[] loadIdList()
Expand Down
2 changes: 1 addition & 1 deletion models/DataObject/ClassDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ public function generateClassFiles($generateDefinitionFile = true)
$cd .= 'use Pimcore\\Model\\DataObject;';
$cd .= "\n\n";
$cd .= "/**\n";
$cd .= ' * @method DataObject\\'.ucfirst($this->getName())." current()\n";
$cd .= ' * @method DataObject\\'.ucfirst($this->getName())."|false current()\n";
$cd .= ' * @method DataObject\\'.ucfirst($this->getName())."[] load()\n";
$cd .= ' * @method DataObject\\'.ucfirst($this->getName())."[] getData()\n";
$cd .= ' */';
Expand Down
2 changes: 1 addition & 1 deletion models/DataObject/ClassDefinition/CustomLayout/Listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* @method \Pimcore\Model\DataObject\ClassDefinition\CustomLayout\Listing\Dao getDao()
* @method Model\DataObject\ClassDefinition\CustomLayout[] load()
* @method Model\DataObject\ClassDefinition\CustomLayout current()
* @method Model\DataObject\ClassDefinition\CustomLayout|false current()
*/
class Listing extends Model\Listing\AbstractListing
{
Expand Down
6 changes: 3 additions & 3 deletions models/DataObject/ClassDefinition/Data/Localizedfields.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Localizedfields extends Data implements CustomResourcePersistingInterface,
/**
* @internal
*
* @var string
* @var string|null
*/
public $tabPosition = 'top';

Expand Down Expand Up @@ -1318,11 +1318,11 @@ public function isFilterable(): bool
*/
public function getTabPosition(): string
{
return $this->tabPosition;
return $this->tabPosition ?? 'top';
}

/**
* @param string $tabPosition
* @param string|null $tabPosition
*/
public function setTabPosition($tabPosition): void
{
Expand Down
6 changes: 3 additions & 3 deletions models/DataObject/ClassDefinition/Layout/Tabpanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Tabpanel extends Model\DataObject\ClassDefinition\Layout
public $border = false;

/**
* @var string
* @var string|null
*/
public $tabPosition = 'top';

Expand All @@ -57,11 +57,11 @@ public function setBorder(bool $border): void
*/
public function getTabPosition(): string
{
return $this->tabPosition;
return $this->tabPosition ?? 'top';
}

/**
* @param string $tabPosition
* @param string $tabPosition|null
*/
public function setTabPosition($tabPosition): void
{
Expand Down
2 changes: 1 addition & 1 deletion models/DataObject/ClassDefinition/Listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @method \Pimcore\Model\DataObject\ClassDefinition\Listing\Dao getDao()
* @method Model\DataObject\ClassDefinition[] load()
* @method Model\DataObject\ClassDefinition current()
* @method Model\DataObject\ClassDefinition|false current()
*/
class Listing extends Model\Listing\AbstractListing
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @method \Pimcore\Model\DataObject\Classificationstore\CollectionConfig\Listing\Dao getDao()
* @method Model\DataObject\Classificationstore\CollectionConfig[] load()
* @method Model\DataObject\Classificationstore\CollectionConfig current()
* @method Model\DataObject\Classificationstore\CollectionConfig|false current()
* @method int getTotalCount()
*/
class Listing extends Model\Listing\AbstractListing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @method \Pimcore\Model\DataObject\Classificationstore\CollectionGroupRelation\Listing\Dao getDao()
* @method Model\DataObject\Classificationstore\CollectionGroupRelation[] load()
* @method Model\DataObject\Classificationstore\CollectionGroupRelation current()
* @method Model\DataObject\Classificationstore\CollectionGroupRelation|false current()
* @method int getTotalCount()
*/
class Listing extends Model\Listing\AbstractListing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @method \Pimcore\Model\DataObject\Classificationstore\GroupConfig\Listing\Dao getDao()
* @method Model\DataObject\Classificationstore\GroupConfig[] load()
* @method Model\DataObject\Classificationstore\GroupConfig current()
* @method Model\DataObject\Classificationstore\GroupConfig|false current()
* @method int getTotalCount()
*/
class Listing extends Model\Listing\AbstractListing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @method \Pimcore\Model\DataObject\Classificationstore\KeyConfig\Listing\Dao getDao()
* @method Model\DataObject\Classificationstore\KeyConfig[] load()
* @method Model\DataObject\Classificationstore\KeyConfig current()
* @method Model\DataObject\Classificationstore\KeyConfig|false current()
* @method int getTotalCount()
*/
class Listing extends Model\Listing\AbstractListing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @method \Pimcore\Model\DataObject\Classificationstore\KeyGroupRelation\Listing\Dao getDao()
* @method Model\DataObject\Classificationstore\KeyGroupRelation[] load()
* @method Model\DataObject\Classificationstore\KeyGroupRelation current()
* @method Model\DataObject\Classificationstore\KeyGroupRelation|false current()
* @method int getTotalCount()
*/
class Listing extends Model\Listing\AbstractListing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @method \Pimcore\Model\DataObject\Classificationstore\StoreConfig\Listing\Dao getDao()
* @method Model\DataObject\Classificationstore\StoreConfig[] load()
* @method Model\DataObject\Classificationstore\StoreConfig current()
* @method Model\DataObject\Classificationstore\StoreConfig|false current()
* @method int getTotalCount()
*/
class Listing extends Model\Listing\AbstractListing
Expand Down
2 changes: 1 addition & 1 deletion models/DataObject/Listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/**
* @method Model\DataObject[] load()
* @method Model\DataObject current()
* @method Model\DataObject|false current()
* @method int getTotalCount()
* @method int getCount()
* @method int[] loadIdList()
Expand Down
2 changes: 1 addition & 1 deletion models/DataObject/Listing/Concrete.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* @method DataObject\Listing\Concrete\Dao getDao()
* @method DataObject\Concrete[] load()
* @method DataObject\Concrete current()
* @method DataObject\Concrete|false current()
*/
abstract class Concrete extends Model\DataObject\Listing
{
Expand Down
Loading

0 comments on commit 9edd80d

Please sign in to comment.