コード例 #1
0
 public function get_explanation_for_stated_intention(Oedipus_Character $character, Oedipus_StatedIntention $stated_intention, Oedipus_Option $option)
 {
     /*
      *Set the Phrases
      */
     $owner_of_option = $character->get_name();
     $owner_of_option_is_plural = self::is_plural($owner_of_option);
     if ($owner_of_option_is_plural) {
         $pronoun = ' they ';
     } else {
         $pronoun = ' he/she ';
     }
     $will_or_wont = self::get_stated_intention_str($stated_intention, $owner_of_position_is_plural);
     /*
      *Construct the sentence
      */
     $explanation = '';
     $explanation .= $owner_of_option . ' ';
     if ($owner_of_option_is_plural) {
         $explanation .= 'have ';
     } else {
         $explanation .= 'has ';
     }
     $explanation .= 'stated that ' . $pronoun . ' ';
     $explanation .= $will_or_wont . ' ';
     $explanation .= $option->get_name() . '.';
     return $explanation;
 }
 public function __construct(Oedipus_Frame $frame, Oedipus_Character $character)
 {
     parent::__construct($frame, 'character_editor');
     //                $this->frame = $frame;
     # Name Input
     $this->add_input_name_with_value('character_name', $character->get_name(), 'character');
     # color Input
     $this->add_input_name_with_value('character_color', $character->get_color(), 'Color');
     # Hidden Inputs
     $this->add_hidden_input('character_id', $character->get_id());
 }
コード例 #3
0
 public function add_character(Oedipus_Character $character)
 {
     $this->characters[$character->get_name()] = $character;
 }
コード例 #4
0
 public function get_stated_intention_tile(Oedipus_StatedIntention $stated_intention, Oedipus_Character $character, $explanation)
 {
     //                <a href="#" class="si-tile" id="character1-option1">0</a>
     if ($this->frame->is_editable()) {
         $html_tile_link = PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditFrameRedirectScript', array('frame_id' => $this->frame->get_id(), 'edit_stated_intention' => 1, 'stated_intention_id' => $stated_intention->get_id(), 'stated_intention_tile' => $stated_intention->get_tile(), 'stated_intention_doubt' => $stated_intention->get_doubt()));
         if (isset($_GET['edit_frame'])) {
             $html_tile_link->set_get_variable('return_to_get', 'edit_frame');
         }
     } else {
         $html_tile_link = new HTMLTags_URL();
         $html_tile_link->set_file('#');
     }
     $html_tile = new HTMLTags_A($stated_intention->get_tile() . $stated_intention->get_doubt());
     $html_tile->set_href($html_tile_link);
     /**
      * An explanation for the position is set here in the
      * title attribute, for the javascript to use as a
      * cool -tip
      */
     $html_tile->set_attribute_str('title', Oedipus_LanguageHelper::get_possessive($character->get_name()) . " Stated Intention" . '|' . $explanation);
     $html_tile->set_attribute_str('class', 'si-tile');
     $html_tile_id = $character->get_color() . $stated_intention->get_tile() . $this->add_q_to_doubt($stated_intention->get_doubt());
     $html_tile->set_attribute_str('id', $html_tile_id);
     return $html_tile;
 }