<?php

namespace Qcr\QcrTheme\Pages;

use Anomaly\Streams\Platform\Support\Observer;
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;

class PageObserver extends Observer
{
    public function saving(EntryInterface $entry)
    {
        if ($entry->entry->disable_indexing == true) {
            $entry->unsearchable();
            $entry->disableSearchSyncing();
        }
    }
}
