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;
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];
236 return isset( $this->modifiedSlots[$role] );
249 return isset( $this->removedRoles[$role] );
277 if ( !
$s->hasSameContent(
$t ) ) {
Base interface for content objects.