This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Determine the best way to render the date based on conditions | |
* | |
* @return string | null | |
*/ | |
public function getEventDate() | |
{ | |
$start = DBDate::create()->setValue($this->owner->StartDate); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = 'https://maps.googleapis.com/maps/api/staticmap?center=Berkeley,CA&zoom=14&size=400x400&key=' . Config::inst()->get(GeocodeService::class, 'google_api_key'); | |
$folder = Folder::find_or_make('maps'); | |
$map = new Image(); | |
$map->setFromString(file_get_contents($url), 'map.png'); | |
$map->ParentID = $folder->ID; | |
$map->write(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Tasks; | |
use Psr\Log\LoggerInterface; | |
use SilverStripe\Core\Injector\Injector; | |
use SilverStripe\Dev\BuildTask; | |
/** | |
* BuildTask to cause Raygun to fire. This can be used to test Slack/Raygun integration. |
OlderNewer