Page MenuHomePhorge

PhabricatorCustomUIFooterConfigType.php
No OneTemporary

PhabricatorCustomUIFooterConfigType.php

<?php
final class PhabricatorCustomUIFooterConfigType
extends PhabricatorConfigJSONOptionType {
public function validateOption(PhabricatorConfigOption $option, $value) {
if (!is_array($value)) {
throw new Exception(
pht(
'Footer configuration is not valid: value must be a list of '.
'items.'));
}
foreach ($value as $idx => $item) {
if (!is_array($item)) {
throw new Exception(
pht(
'Footer item with index "%s" is invalid: each item must be a '.
'dictionary describing a footer item.',
$idx));
}
try {
PhutilTypeSpec::checkMap(
$item,
array(
'name' => 'string',
'href' => 'optional string',
));
} catch (Exception $ex) {
throw new Exception(
pht(
'Footer item with index "%s" is invalid: %s',
$idx,
$ex->getMessage()));
}
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Jan 19 2025, 21:00 (6 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128709
Default Alt Text
PhabricatorCustomUIFooterConfigType.php (992 B)

Event Timeline