UGUI Event won't trigger on empty object

I made a script that brings a UGUI element to the front:

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.EventSystems;

public class MoveToFront : UIBehaviour, IPointerDownHandler {

	public void OnPointerDown( PointerEventData eventData ) {
		Debug.Log("Move to front");
		transform.SetAsLastSibling(); //move to front
		eventData.Use();
	}
}

This works beautifully if I put it on an image, but if I put it on an empty gameObject then it doesn’t work. What do I have to add to make an empty gameObject catch the event?

Add a Collider to the object and a Physics Raycaster to the camera (choose the 3D or 2D variants depending on your requirements).

Also ensure there is an EventSystem in the scene.