protected function registerMacro()
    {
        DataTableAbstract::macro(
            'setTransformer', function ($transformer) {
                $this->transformer = [$transformer];

                return $this;
            }
        );

        DataTableAbstract::macro(
            'addTransformer', function ($transformer) {
                $this->transformer[] = $transformer;

                return $this;
            }
        );

        DataTableAbstract::macro(
            'setSerializer', function ($serializer) {
                $this->serializer = $serializer;

                return $this;
            }
        );
    }