Replace procedural nested array functions: https://drupal.org/node/1870678
Use the new $form_state['controller'] to fetch the form entity.
Merge pull request #1 from das-peter/8.x-1.x

Replace procedural nested array functions, use $form_state['controller']