CampaignMonitor::getTemplate PHP Метод

getTemplate() публичный Метод

Returns a template's configuration detail
public getTemplate ( string $templateId ) : array
$templateId string The ID of the template.
Результат array
    public function getTemplate($templateId)
    {
        // make the call
        $record = (array) $this->doCall('templates/' . $templateId);
        // stop here if no record was set
        if (empty($record)) {
            return array();
        }
        // reserve variable
        $result = array();
        // basic details
        $result['id'] = $record['TemplateID'];
        $result['name'] = $record['Name'];
        $result['preview_url'] = (bool) $record['PreviewURL'];
        $result['screenshot_url'] = $record['ScreenshotURL'];
        // return the record
        return $result;
    }