PHP code example of dbp / relay-base-organization-bundle

1. Go to this page and download the library: Download dbp/relay-base-organization-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dbp / relay-base-organization-bundle example snippets


...
Dbp\Relay\BaseOrganizationBundle\DbpRelayBaseOrganizationBundle::class => ['all' => true],
Dbp\Relay\CoreBundle\DbpRelayCoreBundle => ['all' => true],
];



declare(strict_types=1);

namespace YourUniversity\Service;

use Dbp\Relay\BaseOrganizationBundle\API\OrganizationProviderInterface;
use Dbp\Relay\BaseOrganizationBundle\Entity\Organization;

class OrganizationProvider implements OrganizationProviderInterface
{
    public function getOrganizationById(string $identifier, string $lang): Organization
    {
        return some_method_that_fetches_an_organization_by_id($identifier, $lang);
    }

    /**
     * @return Organization[]
     */
    public function getOrganizationsByPerson(Person $person, string $context, string $lang): array
    {
        return some_method_that_fetches_an_organization_by_person($person, $context, $lang);
    }

    /**
     * @return Organization[]
     */
    public function getOrganizations(string $lang): array
    {
        return some_method_that_fetches_all_organizations($lang);
    }
}