private function setDefaultProfilePicture(PhabricatorProject $project)
 {
     if ($project->isMilestone()) {
         return;
     }
     $compose_color = $project->getDisplayIconComposeColor();
     $compose_icon = $project->getDisplayIconComposeIcon();
     $builtin = id(new PhabricatorFilesComposeIconBuiltinFile())->setColor($compose_color)->setIcon($compose_icon);
     $data = $builtin->loadBuiltinFileData();
     $file = PhabricatorFile::newFromFileData($data, array('name' => $builtin->getBuiltinDisplayName(), 'profile' => true, 'canCDN' => true));
     $project->setProfileImagePHID($file->getPHID())->save();
 }
 private function renderDefaultForm(PhabricatorProject $project)
 {
     $viewer = $this->getViewer();
     $compose_color = $project->getDisplayIconComposeColor();
     $compose_icon = $project->getDisplayIconComposeIcon();
     $default_builtin = id(new PhabricatorFilesComposeIconBuiltinFile())->setColor($compose_color)->setIcon($compose_icon);
     $file_builtins = PhabricatorFile::loadBuiltins($viewer, array($default_builtin));
     $file_builtin = head($file_builtins);
     $default_button = javelin_tag('button', array('class' => 'grey profile-image-button', 'sigil' => 'has-tooltip', 'meta' => array('tip' => pht('Use Icon and Color'), 'size' => 300)), phutil_tag('img', array('height' => 50, 'width' => 50, 'src' => $file_builtin->getBestURI())));
     $inputs = array('projectPHID' => $project->getPHID(), 'icon' => $compose_icon, 'color' => $compose_color);
     foreach ($inputs as $key => $value) {
         $inputs[$key] = javelin_tag('input', array('type' => 'hidden', 'name' => $key, 'value' => $value));
     }
     $default_form = phabricator_form($viewer, array('class' => 'profile-image-form', 'method' => 'POST', 'action' => '/file/compose/'), array($inputs, $default_button));
     return $default_form;
 }