Skip to content

Instantly share code, notes, and snippets.

View matterson11's full-sized avatar

Matthew Matterson matterson11

View GitHub Profile
@matterson11
matterson11 / Displaying Public Information
Last active February 12, 2016 13:38
Displaying Jobs and Projects to the public.
Enhouse provided access to jobs and projects for freelancers inside the network. We also wanted the site to display to the public (Non members) and provide them the ability to search and apply.
This required substantial modifications to several classes, services and controllers inside our Symfony2 framework.
First, inside the SearchController, we have to ensure the visitor is not an existing user (Signed in) using Twig {% if app.user %}.
The application or bidding process is managed through the JobController.
Inside we have public functions indexAction() and projectAction().
indexAction starts by checking and notifying if the user has signed up before (Lines 50 – 58).
Next if the form is valid and they’re a new user we further there application then request email confirmation (Lines 59 – 87)
Next we request a CV (Lines 89 – 107) and confirm.