Call to a member function getHtmlOptions() on null