41 private $modifiedSlots = [];
46 private $removedRoles = [];
66 foreach ( $parentSlots->getSlots() as $role => $slot ) {
67 if ( !isset( $modified[$role] ) ) {
69 } elseif ( $slot->hasSameContent( $modified[$role] ) ) {
71 unset( $modified[$role] );
96 foreach ( $newContent as $role =>
$content ) {
97 $slot = SlotRecord::newUnsaved( $role,
$content );
100 && $parentSlots->hasSlot( $role )
101 && $slot->hasSameContent( $parentSlots->getSlot( $role ) )
107 $modified[$role] = $slot;
117 public function __construct( array $modifiedSlots = [], array $removedRoles = [] ) {
118 foreach ( $modifiedSlots as $slot ) {
122 foreach ( $removedRoles as $role ) {
139 return array_keys( $this->modifiedSlots );
149 return array_keys( $this->removedRoles );
174 unset( $this->removedRoles[$role] );
175 $this->modifiedSlots[$role] = $slot;
186 $slot = SlotRecord::newUnsaved( $role,
$content );
199 unset( $this->modifiedSlots[$role] );
200 $this->removedRoles[$role] =
true;
219 if ( isset( $this->modifiedSlots[$role] ) ) {
220 return $this->modifiedSlots[$role];
223 'No such slot: {role}',
239 return isset( $this->modifiedSlots[$role] );
252 return isset( $this->removedRoles[$role] );
280 if ( !
$s->hasSameContent(
$t ) ) {
Base interface for content objects.
foreach( $mmfl['setupFiles'] as $fileName) if($queue) if(empty( $mmfl['quiet'])) $s