Exemple #1
0
function exchange_build_token_form_cta($pr_obj, $type)
{
    $block = $pr_obj->create_token_form_cta($type);
    if ($block instanceof BasePattern) {
        $griditem = new GridItem($block, 'token', $grid_mods);
        $griditem->publish();
    }
}
 public function publish_collab_files($context = '')
 {
     if (!$this->has_files) {
         return;
     }
     $doc_block_input = array('add_file' => array());
     foreach ($this->files as $file) {
         $doc_block_input['add_file'][] = array('file' => $file);
     }
     $doc_block = BasePattern::pattern_factory($doc_block_input, 'uploaded_files', 'collaboration', true);
     if ($doc_block instanceof Documentblock) {
         $grid_mods = array('type' => 'documentblock');
         $griditem = new GridItem($doc_block, 'collaboration', $grid_mods);
         $griditem->publish();
     }
 }