src/Database/Observers/ContentObserver.php
/**
     * Listen to the Page saved event.
     *
     * @param ContentInterface $content
     */
Listen to the Page saved event.
Listen to the Page saved event .
public function saved(ContentInterface $content)
    {
        if ($content->content_type_id !== null) {
            if (! $content->relationLoaded('type')) {
                $content->load('type');
            }
            $contentType = $content->getRelation('type');
            if ($contentType && $contentType->shouldDynamicTableExist() && ! $contentType->dynamicTableExists()) {
                $contentType->createTable();
            }
        }
    }
public function saved ( ContentInterface $ content ) { if ( $ content -> content_type_id !== null ) { if ( ! $ content -> relationLoaded ( 'type' ) ) { $ content -> load ( 'type' ) ; } $ contentType = $ content -> getRelation ( 'type' ) ; if ( $ contentType && $ contentType -> shouldDynamicTableExist ( ) && ! $ contentType -> dynamicTableExists ( ) ) { $ contentType -> createTable ( ) ; } } }
Listen to the Page saved event.
Listen to the Page saved event .