static function LastTemplateLog($moduleType, $template)
    {
        $tblLogTemplate = \App\Phine\Database\Core\LogTemplate::Schema()->Table();
        $tblLogItem = LogItem::Schema()->Table();
        $sql = Access::SqlBuilder();
        $orderBy = $sql->OrderList($sql->OrderDesc($tblLogItem->Field('Changed')));
        $joinCond = $sql->Equals($tblLogTemplate->Field('LogItem'), $tblLogItem->Field('ID'));
        $where = $sql->Equals($tblLogTemplate->Field('Template'), $sql->Value($template))
                ->And_($sql->Equals($tblLogTemplate->Field('ModuleType'), $moduleType));
        return LogItem::Schema()->First($where, $orderBy, null, $sql->Join($tblLogTemplate), JoinType::Inner(), $joinCond);
    }
static function LastTemplateLog($moduleType, $template)
    {
        $tblLogTemplate = \App\Phine\Database\Core\LogTemplate::Schema()->Table();
        $tblLogItem = LogItem::Schema()->Table();
        $sql = Access::SqlBuilder();
        $orderBy = $sql->OrderList($sql->OrderDesc($tblLogItem->Field('Changed')));
        $joinCond = $sql->Equals($tblLogTemplate->Field('LogItem'), $tblLogItem->Field('ID'));
        $where = $sql->Equals($tblLogTemplate->Field('Template'), $sql->Value($template))
                ->And_($sql->Equals($tblLogTemplate->Field('ModuleType'), $moduleType));
        return LogItem::Schema()->First($where, $orderBy, null, $sql->Join($tblLogTemplate), JoinType::Inner(), $joinCond);
    }
static function LastTemplateLog ( $ moduleType , $ template ) { $ tblLogTemplate = \ App \ Phine \ Database \ Core \ LogTemplate :: Schema ( ) -> Table ( ) ; $ tblLogItem = LogItem :: Schema ( ) -> Table ( ) ; $ sql = Access :: SqlBuilder ( ) ; $ orderBy = $ sql -> OrderList ( $ sql -> OrderDesc ( $ tblLogItem -> Field ( 'Changed' ) ) ) ; $ joinCond = $ sql -> Equals ( $ tblLogTemplate -> Field ( 'LogItem' ) , $ tblLogItem -> Field ( 'ID' ) ) ; $ where = $ sql -> Equals ( $ tblLogTemplate -> Field ( 'Template' ) , $ sql -> Value ( $ template ) ) -> And_ ( $ sql -> Equals ( $ tblLogTemplate -> Field ( 'ModuleType' ) , $ moduleType ) ) ; return LogItem :: Schema ( ) -> First ( $ where , $ orderBy , null , $ sql -> Join ( $ tblLogTemplate ) , JoinType :: Inner ( ) , $ joinCond ) ; }
The last log item that is directly related to the template
@param Content $content The content
@return LogItem Returns the log item
The last log item that is directly related to the template