本文整理汇总了PHP中AphrontDialogView::setResizeY方法的典型用法代码示例。如果您正苦于以下问题:PHP AphrontDialogView::setResizeY方法的具体用法?PHP AphrontDialogView::setResizeY怎么用?PHP AphrontDialogView::setResizeY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AphrontDialogView
的用法示例。
在下文中一共展示了AphrontDialogView::setResizeY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildDialog
public function buildDialog()
{
$user = $this->user;
$filter_id = celerity_generate_unique_node_id();
$query_id = celerity_generate_unique_node_id();
$results_id = celerity_generate_unique_node_id();
$current_id = celerity_generate_unique_node_id();
$search_id = celerity_generate_unique_node_id();
$form_id = celerity_generate_unique_node_id();
require_celerity_resource('phabricator-object-selector-css');
$options = array();
foreach ($this->filters as $key => $label) {
$options[] = phutil_tag('option', array('value' => $key, 'selected' => $key == $this->selectedFilter ? 'selected' : null), $label);
}
$instructions = null;
if ($this->instructions) {
$instructions = phutil_tag('p', array('class' => 'phabricator-object-selector-instructions'), $this->instructions);
}
$search_box = phabricator_form($user, array('method' => 'POST', 'action' => $this->submitURI, 'id' => $search_id), phutil_tag('table', array('class' => 'phabricator-object-selector-search'), phutil_tag('tr', array(), array(phutil_tag('td', array('class' => 'phabricator-object-selector-search-filter'), phutil_tag('select', array('id' => $filter_id), $options)), phutil_tag('td', array('class' => 'phabricator-object-selector-search-text'), phutil_tag('input', array('id' => $query_id, 'type' => 'text')))))));
$result_box = phutil_tag('div', array('class' => 'phabricator-object-selector-results', 'id' => $results_id), '');
$attached_box = phutil_tag_div('phabricator-object-selector-current', phutil_tag_div('phabricator-object-selector-currently-attached', array(phutil_tag_div('phabricator-object-selector-header', $this->header), phutil_tag('div', array('id' => $current_id)), $instructions)));
$dialog = new AphrontDialogView();
$dialog->setUser($this->user)->setTitle($this->title)->setClass('phabricator-object-selector-dialog')->appendChild($search_box)->appendChild($result_box)->appendChild($attached_box)->setRenderDialogAsDiv()->setFormID($form_id)->addSubmitButton($this->buttonText);
if ($this->cancelURI) {
$dialog->addCancelButton($this->cancelURI);
}
$handle_views = array();
foreach ($this->handles as $handle) {
$phid = $handle->getPHID();
$view = new PhabricatorHandleObjectSelectorDataView($handle);
$handle_views[$phid] = $view->renderData();
}
$dialog->addHiddenInput('phids', implode(';', array_keys($this->handles)));
$initial_phids = $this->getInitialPHIDs();
if ($initial_phids) {
$initial_phids = implode(', ', $initial_phids);
$dialog->addHiddenInput('initialPHIDs', $initial_phids);
}
$maximum = $this->getMaximumSelectionSize();
Javelin::initBehavior('phabricator-object-selector', array('filter' => $filter_id, 'query' => $query_id, 'search' => $search_id, 'results' => $results_id, 'current' => $current_id, 'form' => $form_id, 'exclude' => $this->excluded, 'uri' => $this->searchURI, 'handles' => $handle_views, 'maximum' => $maximum));
$dialog->setResizeX(true);
$dialog->setResizeY($results_id);
return $dialog;
}