Skip to content

Commit

Permalink
set $cascade_duplicates to false
Browse files Browse the repository at this point in the history
  • Loading branch information
jellygnite committed Jan 20, 2021
1 parent cf51e49 commit f89d305
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 61 deletions.
9 changes: 3 additions & 6 deletions src/Model/ElementAccordion.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
*
* @method \SilverStripe\ORM\ManyManyList Accordion()
*/
class ElementAccordion extends BaseElement
{
class ElementAccordion extends BaseElement {

private static $cascade_duplicates = false;

/**
* @var string
Expand Down Expand Up @@ -175,8 +176,4 @@ public function getType()
return _t(__CLASS__.'.BlockType', 'Accordion');
}

public function duplicate($doWrite = true, $relations = null) {
$object = parent::duplicate($doWrite, false);
return $object;
}
}
9 changes: 3 additions & 6 deletions src/Model/ElementCarousel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
*
* @method \SilverStripe\ORM\ManyManyList Persons()
*/
class ElementCarousel extends BaseElement
{
class ElementCarousel extends BaseElement {

private static $cascade_duplicates = false;

/**
* @var string
Expand Down Expand Up @@ -175,8 +176,4 @@ public function getType()
return _t(__CLASS__.'.BlockType', 'Carousel');
}

public function duplicate($doWrite = true, $relations = null) {
$object = parent::duplicate($doWrite, false);
return $object;
}
}
9 changes: 2 additions & 7 deletions src/Model/ElementGallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
*
* does not need ShowTitle
*/
class ElementGallery extends BaseElement
{

class ElementGallery extends BaseElement {

private static $cascade_duplicates = false;
/**
* @var string
*/
Expand Down Expand Up @@ -174,8 +173,4 @@ public function getType()
return _t(__CLASS__.'.BlockType', 'Media Gallery');
}

public function duplicate($doWrite = true, $relations = null) {
$object = parent::duplicate($doWrite, false);
return $object;
}
}
9 changes: 3 additions & 6 deletions src/Model/ElementImageGallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*
* does not need ShowTitle
*/
class ElementImageGallery extends BaseElement
{
class ElementImageGallery extends BaseElement {

private static $cascade_duplicates = false;

/**
* @var string
Expand Down Expand Up @@ -167,8 +167,5 @@ public function getType()
return _t(__CLASS__.'.BlockType', 'Image Gallery');
}

public function duplicate($doWrite = true, $relations = null) {
$object = parent::duplicate($doWrite, false);
return $object;
}

}
10 changes: 4 additions & 6 deletions src/Model/ElementLinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
*
* does not need ShowTitle
*/
class ElementLinks extends BaseElement
{
class ElementLinks extends BaseElement {

private static $cascade_duplicates = false;


/**
Expand Down Expand Up @@ -174,8 +175,5 @@ public function getType()
return _t(__CLASS__.'.BlockType', 'Links');
}

public function duplicate($doWrite = true, $relations = null) {
$object = parent::duplicate($doWrite, false);
return $object;
}

}
10 changes: 4 additions & 6 deletions src/Model/ElementPersons.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
*
* @method \SilverStripe\ORM\ManyManyList Persons()
*/
class ElementPersons extends BaseElement
{
class ElementPersons extends BaseElement {

private static $cascade_duplicates = false;

/**
* @var string
Expand Down Expand Up @@ -175,8 +176,5 @@ public function getType()
return _t(__CLASS__.'.BlockType', 'Persons');
}

public function duplicate($doWrite = true, $relations = null) {
$object = parent::duplicate($doWrite, false);
return $object;
}

}
11 changes: 5 additions & 6 deletions src/Model/ElementPopups.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
*
* @method \SilverStripe\ORM\ManyManyList Popups()
*/
class ElementPopups extends BaseElement
{
class ElementPopups extends BaseElement {

private static $cascade_duplicates = false;

/**
* @var string
*/
Expand Down Expand Up @@ -181,8 +183,5 @@ public function getType()
return _t(__CLASS__.'.BlockType', 'Popups');
}

public function duplicate($doWrite = true, $relations = null) {
$object = parent::duplicate($doWrite, false);
return $object;
}

}
10 changes: 4 additions & 6 deletions src/Model/ElementPromos.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
*
* @method \SilverStripe\ORM\ManyManyList Promos()
*/
class ElementPromos extends BaseElement
{
class ElementPromos extends BaseElement {

private static $cascade_duplicates = false;
/**
* @var string
*/
Expand Down Expand Up @@ -181,8 +182,5 @@ public function getType()
return _t(__CLASS__.'.BlockType', 'Promos');
}

public function duplicate($doWrite = true, $relations = null) {
$object = parent::duplicate($doWrite, false);
return $object;
}

}
10 changes: 4 additions & 6 deletions src/Model/ElementSlides.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
*
* does not need ShowTitle
*/
class ElementSlides extends BaseElement
{
class ElementSlides extends BaseElement {

private static $cascade_duplicates = false;


/**
Expand Down Expand Up @@ -189,8 +190,5 @@ public function getType()
return _t(__CLASS__.'.BlockType', 'Slides');
}

public function duplicate($doWrite = true, $relations = null) {
$object = parent::duplicate($doWrite, false);
return $object;
}

}
10 changes: 4 additions & 6 deletions src/Model/ElementSponsors.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
*
* @method \SilverStripe\ORM\ManyManyList Persons()
*/
class ElementSponsors extends BaseElement
{
class ElementSponsors extends BaseElement {

private static $cascade_duplicates = false;

/**
* @var string
Expand Down Expand Up @@ -180,8 +181,5 @@ public function isCarousel() {
return ($this->Style == 'carousel');
}

public function duplicate($doWrite = true, $relations = null) {
$object = parent::duplicate($doWrite, false);
return $object;
}

}

0 comments on commit f89d305

Please sign in to comment.