public function Mandrill_TemplatesTest::getList in Mandrill 7.2
See also
Mandrill_Templates::getList()
File
- tests/
includes/ mandrill_templates_test.inc, line 15 - A virtual Mandrill Templates API implementation for use in testing.
Class
- Mandrill_TemplatesTest
- @file A virtual Mandrill Templates API implementation for use in testing.
Code
public function getList($label = NULL) {
$templates = $this
->getTestTemplatesData();
if (empty($label)) {
$matched_templates = $templates;
}
else {
$matched_templates = array();
foreach ($templates as $template) {
if (in_array($label, $template->labels)) {
$matched_templates[] = $template;
}
}
}
return $matched_templates;
}