66 foreach ( $parentSlots->getSlots() as $role => $slot ) {
67 if ( !isset( $modified[$role] ) ) {
69 } elseif ( $slot->hasSameContent( $modified[$role] ) ) {
71 unset( $modified[$role] );
95 foreach ( $newContent as $role =>
$content ) {
96 $slot = SlotRecord::newUnsaved( $role,
$content );
99 && $parentSlots->hasSlot( $role )
100 && $slot->hasSameContent( $parentSlots->getSlot( $role ) )
106 $modified[$role] = $slot;
138 return array_keys( $this->modifiedSlots );
148 return array_keys( $this->removedRoles );
173 unset( $this->removedRoles[$role] );
174 $this->modifiedSlots[$role] = $slot;
185 $slot = SlotRecord::newUnsaved( $role,
$content );
198 unset( $this->modifiedSlots[$role] );
199 $this->removedRoles[$role] =
true;
218 if ( isset( $this->modifiedSlots[$role] ) ) {
219 return $this->modifiedSlots[$role];
235 return isset( $this->modifiedSlots[$role] );
248 return isset( $this->removedRoles[$role] );
276 if ( !
$s->hasSameContent(
$t ) ) {
Base interface for content objects.