Main page. Show all messages.

@since 2.0.0
@access public
331314
public function Index() {
      $this->Permission('Garden.Messages.Manage');
      $this->AddSideMenu('dashboard/message');
      $this->AddJsFile('jquery.autogrow.js');
      $this->AddJsFile('jquery.tablednd.js');
      $this->AddJsFile('jquery-ui.js');
      $this->AddJsFile('messages.js');
      $this->Title(T('Messages'));
         
      // Load all messages from the db
      $this->MessageData = $this->MessageModel->Get('Sort');
      $this->Render();
   }
948992
public function main()
    {
        Configure::write('App.baseUrl', '/');

        $conditions = [];
        if ($this->args) {
            $conditions['id IN'] = $this->args;
        }

        $emailQueue = TableRegistry::get('EmailQueue', ['className' => EmailQueueTable::class]);
        $emails = $emailQueue->find()->where($conditions)->toList();

        if (!$emails) {
            $this->out('No emails found');

            return;
        }

        $this->clear();
        foreach ($emails as $i => $email) {
            if ($i) {
                $this->in('Hit a key to continue');
                $this->clear();
            }
            $this->out('Email :' . $email['EmailQueue']['id']);
            $this->preview($email);
        }
    }
203298
public function main()
    {
        $this->loadModel('CakeManager.Users');

        $email = $this->in('Enter the e-mailaddress');

        $password = $this->in('Enter the password');

        $data = [
            'email' => $email,
            'password' => $password,
        ];

        $new = $this->Users->newEntity($data);

        $new->set('role_id', 1);
        $new->set('active', 1);

        if ($this->Users->save($new)) {
            $this->out('The user "' . $email . '" has been created.');
            return true;
        }

        $this->out('Someting went wrong. The user could not be saved. We will debug the validation errors...');

        if ($new->errors()) {
            $errors = $new->errors();
            foreach ($errors as $key => $error) {
                foreach ($error as $message) {
                    $this->out($key . ': ' . ($message));
                }
            }
        }

        return false;
    }
179919
public function run()
    {
        $heading = '';
        if (isset($this->heading) && $this->heading != '') {
            Html::addCssClass($this->headingOptions, 'panel-heading');
            $heading = Html::tag('div', '<h3 class="panel-title">' . $this->heading . '</h3>', $this->headingOptions);
        }
        $body = Html::tag('div', $this->renderMenu(), ['class' => 'metro table']);
        $type = in_array($this->type, self::$_validTypes) ? $this->type : self::TYPE_DEFAULT;
        Html::addCssClass($this->containerOptions, "panel panel-{$type}");
		$this->containerOptions['style']="padding-left:10px;";
        echo Html::tag('div', $heading . $body, $this->containerOptions);
    }
421352
public function show()
    {
        if( $this->isVisible === false )
        {
            return;
        }

        $this->init();
        $this->load();
        $this->preRender();
        $this->render();
        $this->postRender();
        $this->unload();
    }
755556
def show_messages(self):
        """"""
        string = ''
        if self.static_message is not None:
            string += self.static_message.to_text()

        for message in self.dynamic_messages:
            string += message.to_text()

        print(string)
139389
public function main_init() {
		if ( $this->_initialized ) {
			return;
		}
		$this->_initialized = true;

		$this->filter->do_action( 'app_initialize', $this );
		$this->setup_property();
		$this->setup_textdomain();
		$this->setup_settings();
		$this->filter->do_action( 'app_initialized', $this );
	}
287581
public function show()
    {
        if ($this->plugin['request']->ajax()) {
            $this->plugin['response']->setContent(html_entity_decode($this->attributes['messages'][0]))->send();
            exit;
        } else {
            print $this->plugin->view('admin.framework.settings', $this->attributes);
        }
    }
1189330
public function render(): void
	{
		$page = $this->paginator->page;
		if ($this->paginator->pageCount < 2) {
			$steps = [$page];
			$viewed = false;
		} else {
			$viewed = true;

			$f = $first = $page - $this->pageAround;
			$l = $last = $page + $this->pageAround;
			if ($f < $this->paginator->firstPage) {
				$last += ($this->paginator->firstPage - $f);
			}
			if ($l > $this->paginator->lastPage) {
				$first -= ($l - $this->paginator->lastPage);
			}
			$arr = range(max($this->paginator->firstPage, $first), min($this->paginator->lastPage, $last));

			if ($this->othersPage > 0) {
				$count = $this->othersPage * 2;
				$quotient = ($this->paginator->pageCount - 1) / $count;
				for ($i = 0; $i <= $count; $i++) {
					$arr[] = round($quotient * $i) + $this->paginator->firstPage;
				}
				sort($arr);
				$steps = array_values(array_unique($arr));
			} else {
				$steps = $arr;
			}
		}

		$this->template->viewed = $viewed;
		$this->template->steps = $steps;
		$this->template->paginator = $this->paginator;
		$this->template->isAjax = $this->isAjax;
		$this->template->noHistory = $this->noHistory;
		$this->template->prev = $this->prev;
		$this->template->next = $this->next;
		$this->template->other = $this->other;
		if (count($this->onClick ?? []) > 0) {
			$this->template->handle = 'click!';
		} else {
			$this->template->handle = 'this';
		}

		$this->template->setFile($this->templateFile);
		$this->template->render();
	}
974809
public function show()
	{
		//get the global $config array for site title
		global $config;

		//set the title variable
		$title = $config['title'];

		//the variable to be populated with the error message
		$msg = $this->getCode() . ': Error on line '.$this->getLine().' in '.$this->getFile() .': <b>  "'.$this->getMessage().' " </b> ';

		//load the template file
		include Path::sys() . 'Exceptions' . DIRECTORY_SEPARATOR . 'index.php';

		//stop further output
		exit();

	}
1213170
public function main( $main_class = '' ) {
		if ( count( $containers = $this->containers() ) > 0 ) {
			echo '<main class="wplibs-box__container ' . esc_attr( $main_class ) . '">';
			$this->show_sections( $containers );
			echo '</main>';
		} else {
			$this->show_fields( $this->get_form()->all() );
		}
	}
672474
public function showMessagesOnSession()
    {
        session()->flash('errorMessages', $this->errorMessages);
        session()->flash('infoMessages', $this->infoMessages);
        session()->flash('successMessages', $this->successMessages);
        session()->flash('warningMessages', $this->warningMessages);
    }
42955
public function main()
    {
        $d = $this->getNow();

        foreach ($this->customFormats as $cf) {
            $cf->execute($this, $d, $this->getLocation());
        }

        $dstamp = strftime('%Y%m%d', $d);
        $this->prefixProperty('DSTAMP', $dstamp);

        $tstamp = strftime('%H%M', $d);
        $this->prefixProperty('TSTAMP', $tstamp);

        $today = strftime('%B %d %Y', $d);
        $this->prefixProperty('TODAY', $today);
    }
618053
public function panelCommand(): void
    {
        $data = [
            'application version' => '1.2.0',
            'system version'      => '5.2.3',
            'key'                 => 'value ...',
            'a only value message text',
        ];

        Show::panel($data, 'panel show', [
            'borderChar' => '*'
        ]);

        Show::panel($data, 'panel show', [
            'borderChar' => '='
        ]);

        Panel::create([
            'data'        => $data,
            'title'       => 'panel show',
            'titleBorder' => '=',
            'footBorder'  => '=',
        ])->display();
    }
34328
public function output()
    {
        if ( $this->session->has('flashMessages') ) {
            $flashMessages = $this->session->get('flashMessages');
            $this->session->set('flashMessages', []);
            $html = null;
            foreach ($flashMessages as $message) {
                $html .= "<div class='". $message['type'] . "'>" . $message['message'] . "</div>";
            }
            return $html;
        }
    }
788854
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        // add a hidden field so we can check if this list was submitted on
        // the process step
        $this->getForm()->addHiddenField($this->id . '_submitted', 1);

        if (count($this->pages) === 1) {
            $this->displaySinglePage(reset($this->pages));
        } else {
            $table = new SwatHtmlTag('table');
            $table->id = $this->id;
            $table->class = 'swat-radio-note-book';
            $table->open();

            echo '<tbody>';

            $count = 0;
            foreach ($this->pages as $page) {
                if (!$page->visible) {
                    continue;
                }

                $count++;

                $this->displayPage($page, $count);
            }

            echo '</tbody>';

            $table->close();

            Swat::displayInlineJavaScript($this->getInlineJavaScript());
        }
    }
264978
private function render()
    {
        $str = $this->args['container_start'];

        if ($this->args['show_parent'] && $this->parent_page_id !== false) {
            $str .= $this->get_parent_link_html();
        }

        foreach ($this->pages as $page) {
            $str .= $this->get_link_html($page);
        }

        $str .= $this->args['container_end'];
        echo $str;
    }