本文整理汇总了PHP中model::property方法的典型用法代码示例。如果您正苦于以下问题:PHP model::property方法的具体用法?PHP model::property怎么用?PHP model::property使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model
的用法示例。
在下文中一共展示了model::property方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
echo \model::property("to_send");
?>
</div>
<div class="col-md-2"><?php
echo \model::property("start");
?>
<br><?php
echo \model::property("finish");
?>
</div>
<div class="col-md-1"><?php
echo \model::property("limit");
?>
</div>
<div class="col-md-2"><?php
echo \model::property("test_address");
?>
</div>
<div class="col-md-1"><a href="admin/newsletter/campaign/?id=<?php
echo \model::property("campaign_id");
?>
" class="btn btn-primary">Modify campaign</a></div>
<div class="col-md-1"><a href="admin/newsletter/send/?id=<?php
echo \model::property("id");
?>
&cid=<?php
echo \model::property("campaign_id");
?>
" class="btn btn-success">Send campaign</a></div>
</div>
示例2: array
<?php
/**
* Created by PhpStorm.
* User: csibi
* Date: 2013.11.15.
* Time: 11:27
*/
$accept = array();
if ($model = $runner->model) {
$accept = model::property('accept');
} elseif (isset($runner->context['accept'])) {
$accept = $runner->context['accept'];
}
if (!function_exists('reorder')) {
function reorder($children)
{
$order = array(0);
array_walk($children, function ($val) use(&$order) {
$order[] = $val['reference'];
});
return $order;
}
}
$element = isset($accept['panel']['element']) ? $accept['panel']['element'] : 'ul';
$html = '';
$parsed = \Routerunner\Helper::parse_array($accept, $model, array("children"));
if (isset($parsed['panel']['attr']) && is_array($parsed['panel']['attr'])) {
foreach ($parsed['panel']['attr'] as $attr => $value) {
$html .= ' ' . $attr . '="' . $value . '"';
}
示例3: array
<?php
$debug = 1;
?>
<li class="rr-menu-model<?php
echo $runner->context["has_children_class"];
echo $runner->context["selected_class"];
?>
">
<a href="<?php
echo model::url();
?>
"<?php
echo $runner->context["has_children_class"] ? ' class="dropdown-toggle" data-toggle="dropdown"' : '';
?>
><span class="rr-menu-label"><?php
echo model::property("label");
?>
</span><?php
echo $runner->context["has_children_class"] ? '<b class="caret"></b>' : '';
?>
</a>
<ul class="dropdown-menu">
<?php
\runner::route("submenu", array("menu" => \model::property("reference")));
?>
</ul>
</li>
示例4:
<?php
$class = \runner::stack("testimonial_index") === 0 ? " active" : "";
\runner::stack("testimonial_index", \runner::stack("testimonial_index") + 1);
?>
<div class="item testimonial-item<?php
echo $class;
?>
">
<p class="citation"><?php
echo \model::property("brief");
?>
</p>
<p class="author"><span class="name"><?php
echo \model::property("label");
?>
</span> / <span class="position"><?php
echo \model::property("position");
?>
</span> / <span class="company"><?php
echo \model::property("company");
?>
</span></p>
</div>
示例5:
<a href="category/<?php
echo \model::property("cat_url");
?>
" title="<?php
echo \model::property("label");
?>
" class="list-group-item"><?php
echo \model::property("label");
?>
</a>
示例6: urlencode
</a>
</h2>
<p class="lead">
by <a href="?search=<?php
echo urlencode(\model::property("author"));
?>
" class="rr-post-author"><?php
echo \model::property("author");
?>
</a>
</p>
<p><span class="glyphicon glyphicon-time"></span> Posted on <span class="rr-post-date"><?php
echo \model::call("date_str");
?>
</span></p>
<hr>
<?php
echo \model::call("image", "leadimage");
?>
<div class="rr-post-lead lead">
<?php
echo \model::property("lead");
?>
</div>
<a class="btn btn-primary" href="<?php
echo \model::url();
?>
">Read More <span class="glyphicon glyphicon-chevron-right"></span></a>
<hr>
示例7: explode
echo \model::property("description");
?>
</div>
<ul class="price-descr">
<?php
$list = explode("\n", \model::property("content"));
array_walk($list, function ($item, $key) {
echo "<li>" . $item . "</li>";
});
?>
</ul>
<?php
if (\model::property("link") && \model::property("button")) {
?>
<footer class="price-footer">
<a href="<?php
echo \model::property("link");
?>
"
class="btn btn-default"><?php
echo \model::property("button");
?>
</a>
</footer>
<?php
}
?>
</div>
</div>
示例8:
</div>
<div class="col-md-1"><?php
echo \model::property("active") == "1" ? "yes" : "no";
?>
</div>
<div class="col-md-1"><?php
echo \model::property("sent");
?>
</div>
<div class="col-md-1"><?php
echo \model::property("to_send");
?>
</div>
<div class="col-md-1"><?php
echo \model::property("opened");
?>
</div>
<div class="col-md-1"><?php
echo \model::property("clicked");
?>
</div>
<div class="col-md-1"><a href="admin/newsletter/campaign/?id=<?php
echo \model::property("id");
?>
" class="btn btn-primary">Modify</a></div>
<div class="col-md-1"><a href="admin/newsletter/send/?id=<?php
echo \model::property("id");
?>
" class="btn btn-success">Send</a></div>
</div>
示例9: call
public static function call()
{
$return = false;
$args = func_get_args();
$runner = \Routerunner\Routerunner::getParentInstance(false)->runner;
if (!is_null($runner->model) && $runner->model == model::$object) {
$fn = isset($args[0]) ? array_shift($args) : false;
if ($fn && !(isset($runner->functions[$fn]) && !is_string($runner->functions[$fn]) && is_callable($runner->functions[$fn]))) {
$fn = false;
}
$arg = isset($args[0]) ? array_shift($args) : false;
if ($arg) {
if (is_string($arg) && !is_null(model::property($arg)) && count($args) == 0) {
$return = $runner->functions[$fn](model::$object, model::property($arg), $arg, $args);
} else {
$return = $runner->functions[$fn](model::$object, null, $arg, $args);
}
} else {
$return = $runner->functions[$fn](model::$object, $args);
}
}
return $return;
}
示例10: array
?>
">
</a>
<?php
}
?>
<div class="media-body">
<h4 class="media-heading"><span class="rr-comment-subject"><?php
echo \model::property("subject");
?>
</span>
<small><?php
echo \model::call("date_str");
?>
</small>
</h4>
<div class="rr-comment-comment">
<?php
echo \model::property("comment");
?>
</div>
<a href="#" class="reply-btn" data-reply-to="<?php
echo \model::property("id");
?>
">Reply</a>
</div>
<?php
\runner::route("/desktop/body/content/post/comment", array("model_reference" => \model::property("model_reference"), "reply" => \model::property("id")));
?>
</div>
示例11: rr_property_tag
function rr_property_tag($model)
{
$delimiter = ";";
$tag_property = strtolower($model->tag);
$tags = explode($delimiter, $tag_property);
if ($tags && count($tags) == 1 && trim($tags[0]) === "") {
$tags = array();
}
$return = '<span class="a_tags">';
$tag_urls = "";
foreach ($tags as $tag) {
$tag_urls .= "'" . trim($tag) . "',";
}
$SQLtag = 'SELECT url, label FROM tag WHERE url IN (' . trim($tag_urls, ",") . ')';
$tag_from_db = array();
if ($result = \db::query($SQLtag)) {
foreach ($result as $row) {
$tag_from_db[$row["url"]] = $row["label"];
}
}
$SQLinsert = 'INSERT INTO tag (url, label) VALUES (:url, :label)';
$SQLupdate = 'UPDATE media SET tag = :tag WHERE id = :id';
if ($tags) {
foreach ($tags as $tag) {
$tag = trim($tag);
if (isset($tag_from_db[$tag])) {
$return .= '<a href="?tag=' . $tag . '" rel="tag">' . $tag_from_db[$tag] . '</a>, ';
} elseif ($tag) {
$url = \runner::toAscii(strtolower($tag));
if (\db::insert($SQLinsert, array(":url" => $url, ":label" => $tag))) {
$tag_property = str_replace($tag, $url, $tag_property);
\db::query($SQLupdate, array(":tag" => $tag_property, ":id" => \model::property("table_id")));
$return .= '<a href="?tag=' . $url . '" rel="tag">' . $tag . '</a>, ';
}
}
}
$return = trim($return, ", ");
$return .= '</span>';
}
if (\runner::config("mode") == "backend") {
$return .= '<select name="tag" id="tag-' . $model->reference . '" class="frm input form-control" multiple="multiple" style="display: none;">' . PHP_EOL;
$SQL = 'SELECT url, label FROM tag ORDER BY url';
if ($options = \db::query($SQL)) {
foreach ($options as $option) {
$selected = in_array($option["url"], $tags) ? ' selected="selected"' : '';
$return .= ' <option value="' . $option["url"] . '"' . $selected . '>' . $option["label"] . '</option>' . PHP_EOL;
}
}
$return .= '</select>' . PHP_EOL;
//$return .= '<link rel="stylesheet" type="text/css" href="' . \runner::config("BASE") . 'Routerunner/metronic/assets/global/plugins/select2/select2.css"/>' . PHP_EOL;
}
return $return;
}
示例12: array
<?php
/**
* Created by PhpStorm.
* User: csibi
* Date: 2015.07.17.
* Time: 8:49
*/
$form = array('method' => 'post', 'xmethod' => 'post', 'name' => 'order', 'error_format' => '<p class="err">%s</p>' . PHP_EOL, 'from' => 'order');
$nonce = uniqid(rand(0, 1000000));
if (!isset($_POST["nonce"])) {
$_SESSION["nonce"] = \Routerunner\Crypt::crypter($nonce);
}
$input = array('nonce' => array('type' => 'hidden', 'field' => 'nonce', 'input-id' => 'input_nonce', 'value' => $nonce), 'date' => array('type' => 'hidden', 'field' => 'date', 'input-id' => 'input_date', 'value' => time()), 'product' => array('type' => 'hidden', 'field' => 'product', 'input-id' => 'input_product', 'value' => \model::property("id")), 'item' => array('selector' => '#input_item', 'type' => 'text', 'field' => 'item', 'label' => 'item *', 'input-id' => 'input_item', 'class' => '', 'mandatory' => array('value' => true, 'msg' => 'Required field: item!'), 'value' => isset($_POST["item"]) ? $_POST["item"] : ""), 'submit' => array('type' => 'submit', 'field' => 'submit', 'input-id' => 'input_submit', 'value' => 'Submit'));
$unset = array("nonce", "submit");
示例13: elseif
$runner->context["model"] = $model;
}
} elseif (isset($runner->context["reference"], $runner->context["model_class"])) {
$router = false;
$context = array("direct" => $runner->context["reference"], "session" => \runner::stack("session_id"), "silent" => true);
$model_route = "/model/" . $runner->context["model_class"];
\runner::redirect_route($model_route, \runner::config("scaffold"), true, $context, $router, $model);
if (is_array($model)) {
$model = array_shift($model);
}
$runner->context["model"] = $model;
if ($model && $model->permission && !$model->activate_allowed()) {
$allowed = false;
}
}
$reference = model::property("model");
$data = ' data-reference="' . $reference . '"';
?>
<div class="portlet light">
<div class="portlet-title">
<div class="caption font-red col-md-3">
<i class="fa fa-eye-slash font-red"></i>
<span class="caption-subject bold uppercase"> Visibility</span>
</div>
<?php
if ($allowed) {
$active = !is_null(model::state("active", $model)) ? model::state("active", $model) : true;
$begin = model::state("begin", $model) ? filter_var(model::state("begin", $model), FILTER_VALIDATE_INT) : null;
$end = model::state("end", $model) ? filter_var(model::state("end", $model), FILTER_VALIDATE_INT) : null;
?>
示例14:
<?php
echo model::property("reference");
?>
</td>
<td>
<?php
echo model::property("date");
?>
</td>
<td>
<?php
echo model::property("user");
?>
</td>
<td>
<?php
echo model::property("model");
?>
</td>
<td>
<?php
echo model::property("approved");
?>
</td>
<td>
<?php
echo model::property("approver");
?>
</td>
</tr>
示例15: stripslashes
<div class="col-md-2"><?php
echo stripslashes(\model::property("clicked"));
?>
</div>
<div class="col-md-2"><?php
echo \model::property("name");
?>
<br><strong><?php
echo \model::property("email");
?>
</strong></div>
<div class="col-md-2"><?php
echo \model::property("category");
?>
</div>
<div class="col-md-2"><?php
echo strftime("%Y-%m-%d %H:%M:%S", \model::property("send_date"));
?>
<br><strong><?php
echo \model::property("unsubscribe_date") ? strftime("%Y-%m-%d %H:%M:%S", \model::property("unsubscribe_date")) : "";
?>
</strong></div>
<div class="col-md-2"><?php
echo \model::property("campaign_label");
?>
<br><?php
echo \model::property("subject");
?>
</div>
</div>