Understand Drupal Events Versus Hooks

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:09
    When I say Drupal,
  • 0:10
    most people think Hooks
  • 0:12
    and then some people roll their eyes.
  • 0:15
    Yep, the infamous,
  • 0:16
    but honestly super powerful Hooks system
  • 0:19
    still exists.
  • 0:21
    But not everything uses Hooks anymore,
  • 0:24
    some use a brand new Event System.
  • 0:27
    With events, you create a function
  • 0:29
    and then tell Drupal to call your function
  • 0:09
    Quando eu digo Drupal,
  • 0:10
    a maioria das pessoas pensam sobre Hooks
  • 0:12
    e algumas pessoas reviram seus olhos.
  • 0:15
    Sim, o infame,
  • 0:16
    mas super poderoso sistema de Hooks
  • 0:19
    ainda existe.
  • 0:21
    Mas nem tudo ainda usa Hooks,
  • 0:24
    algumas coisas usam o novíssimo Event System (sistema de eventos).
  • 0:27
    Com eventos, você cria uma função
  • 0:29
    e depois manda o Drupal chamar sua função