Error: Using $this when not in object context: Component not found.