Changed CMS::getMaterialsByStructures() inner handler logic, moved to standart ActiveRecord Query::handler() method, and from now u can pass array of handlers and array of parameters for this handlers to this function and it will pass it to outer query further via handler() method. old style single callable and parameters are supported also.