Make method static for direct function call in search form template.

Some phpDocs as well.