function ReportLayoutAction(Layout $layout, Enums\Action $action)
    {
        $logItem = $this->CreateLogItem(Enums\ObjectType::Layout(), $action);       
        if (!$action->Equals(Enums\Action::Delete()))
        {
            $logLayout = new LogLayout();
            $logLayout->SetLogItem($logItem);
            $logLayout->SetLayout($layout);
            $logLayout->Save();
        }
        else
        {
            //pages are deleted in cascade
            $pages = Page::Schema()->FetchByLayout(false, $layout);
            foreach ($pages as $page)
            {
                $this->ReportPageAction($page, Enums\Action::Delete());
            }
        }
    }
function ReportLayoutAction(Layout $layout, Enums\Action $action)
    {
        $logItem = $this->CreateLogItem(Enums\ObjectType::Layout(), $action);       
        if (!$action->Equals(Enums\Action::Delete()))
        {
            $logLayout = new LogLayout();
            $logLayout->SetLogItem($logItem);
            $logLayout->SetLayout($layout);
            $logLayout->Save();
        }
        else
        {
            //pages are deleted in cascade
            $pages = Page::Schema()->FetchByLayout(false, $layout);
            foreach ($pages as $page)
            {
                $this->ReportPageAction($page, Enums\Action::Delete());
            }
        }
    }
function ReportLayoutAction ( Layout $ layout , Enums \ Action $ action ) { $ logItem = $ this -> CreateLogItem ( Enums \ ObjectType :: Layout ( ) , $ action ) ; if ( ! $ action -> Equals ( Enums \ Action :: Delete ( ) ) ) { $ logLayout = new LogLayout ( ) ; $ logLayout -> SetLogItem ( $ logItem ) ; $ logLayout -> SetLayout ( $ layout ) ; $ logLayout -> Save ( ) ; } else { //pages are deleted in cascade $ pages = Page :: Schema ( ) -> FetchByLayout ( false , $ layout ) ; foreach ( $ pages as $ page ) { $ this -> ReportPageAction ( $ page , Enums \ Action :: Delete ( ) ) ; } } }
Reports a layout action with dependencies to the log
@param Layout $layout The layout being manipulated
@param Enums\Action $action The operation executed on the layout
Reports a layout action with dependencies to the log