$v) { switch ($k) { case 'sigil': $attributes['data-sigil'] = $v; unset($attributes[$k]); break; case 'meta': $response = CelerityAPI::getStaticResourceResponse(); $id = $response->addMetadata($v); $attributes['data-meta'] = $id; unset($attributes[$k]); break; case 'mustcapture': $attributes['data-mustcapture'] = '1'; unset($attributes[$k]); break; } } } return phutil_render_tag($tag, $attributes, $content); } function phabricator_render_form(PhabricatorUser $user, $attributes, $content) { if (strcasecmp(idx($attributes, 'method'), 'POST') == 0 && !preg_match('#^(https?:|//)#', idx($attributes, 'action'))) { $content = phutil_render_tag( 'input', array( 'type' => 'hidden', 'name' => AphrontRequest::getCSRFTokenName(), 'value' => $user->getCSRFToken(), )). phutil_render_tag( 'input', array( 'type' => 'hidden', 'name' => '__form__', 'value' => true, )). $content; } return javelin_render_tag('form', $attributes, $content); }