What's New With 2.2.0
Major Features
Criteria Query Fluent If Statements - when()
when()c = newCriteria();
if( isBoolean( arguments.isPublished ) ){
c.isEq( "isPublished", isPublished );
// Published eq true evaluate other params
if( isPublished ){
c.isLt( "publishedDate", now() )
.$or( c.restrictions.isNull( "expireDate" ), c.restrictions.isGT( "expireDate", now() ) )
.isEq( "passwordProtection","" );
}
}
if( !isNull( arguments.showInSearch ) ){
c.isEq( "showInSearch", showInSearch );
}
return c.list();PeekaBoo! - peek()
peek()ValidateOrFail()
Release Notes
Last updated
Was this helpful?