Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Table Bundle Laravel Package

araise/table-bundle

View on GitHub
Deep Wiki
Context7

Formatter

Formatter are simple classes to convert a given variable to a string.

You can create your own formatter (you must implement araise\CoreBundle\Formatter\FormatterInterface or extend araise\CoreBundle\Formatter\AbstractFormatter) and add the full class name of your formatter to the options array of a content element.

Register

Your formatters needs to be registered as service with the tag core.formatter. For example:

    Acme\AppBundle\Formatter\:
        resource: '../../Formatter'
        tags:
            - core.formatter

EmailFormatter

<?php

namespace araise\CoreBundle\Formatter;

class EmailFormatter extends AbstractFormatter
{
    /**
     * {[@inheritdoc](https://github.com/inheritdoc)}
     */
    public static function getString($value)
    {
        if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
            return '';
        }

        return $value;
    }

    /**
     * {[@inheritdoc](https://github.com/inheritdoc)}
     */
    public static function getHtml($value)
    {
        if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
            return '';
        }

        return sprintf(
            '<a href="mailto:%s" title="E-Mail senden">%s</a>',
            $value,
            $value
        );
    }
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin