Youshido\Tests\StarWars\Schema\StarWarsData::getFriends PHP Method

getFriends() static public method

Allows us to query for a character's friends.
static public getFriends ( $character )
    static function getFriends($character)
    {
        return array_map([__CLASS__, 'getCharacter'], $character['friends']);
    }

Usage Example

Beispiel #1
0
 public function build($config)
 {
     parent::build($config);
     $config->getField('friends')->getConfig()->set('resolve', function ($droid) {
         return StarWarsData::getFriends($droid);
     });
     $config->addField('primaryFunction', TypeMap::TYPE_STRING);
 }
All Usage Examples Of Youshido\Tests\StarWars\Schema\StarWarsData::getFriends