本文整理汇总了PHP中Requirement::with方法的典型用法代码示例。如果您正苦于以下问题:PHP Requirement::with方法的具体用法?PHP Requirement::with怎么用?PHP Requirement::with使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requirement
的用法示例。
在下文中一共展示了Requirement::with方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_row
function test_row(Requirement $req, $indentation, TableCreator $table_creator, $filter_cat, $filter_pri)
{
$test = $req->with('system_test')->system_test;
$ret = "";
if (isset($req->system_test) && (!is_numeric($filter_cat) || $req->category == $filter_cat) && (!is_numeric($filter_pri) || $req->priority == $filter_pri)) {
$test->with('test');
$ret .= $table_creator->row(array($test->public_id(), $test->test->description, 'success', $table_creator->anchor($req->public_id(), $req->public_id())));
}
$nested = $req->with('requirements')->requirements;
foreach ($nested as $nreq) {
$ret .= test_row($nreq, $indentation + 1, $table_creator, $filter_cat, $filter_pri);
}
return $ret;
}
示例2: test_row
function test_row(Requirement $req, $indentation, TableCreator $table_creator, $filter_cat, $filter_pri)
{
$test = $req->with('system_test')->system_test;
$validation = $req->with('validation0')->validation0;
$ret = "";
$rv = '';
if (isset($test)) {
$rv = $test->public_id();
} else {
if (isset($validation)) {
$rv = $validation->name;
}
}
$ret .= $table_creator->row(array($table_creator->child_indentation($indentation), $req->public_id(), $rv));
$nested = $req->with('requirements')->requirements;
foreach ($nested as $nreq) {
$ret .= test_row($nreq, $indentation + 1, $table_creator, $filter_cat, $filter_pri);
}
return $ret;
}
示例3: req_row
function req_row(Requirement $req, $indentation, TableCreator $table_creator)
{
$req->with('validationTest', 'requirements');
$ret = "";
$ret .= $table_creator->row(array($table_creator->child_indentation($indentation), $req->public_id(), $req->validationTest == null ? '' : $req->validationTest->public_id()));
$nested = $req->requirements;
foreach ($nested as $c) {
$ret .= req_row($c, $indentation + 1, $table_creator);
}
return $ret;
}
示例4: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
$model = new Requirement('search');
$model->with('category0', 'priority0', 'parent0');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Requirement'])) {
$model->attributes = $_GET['Requirement'];
}
$this->render('admin', array('model' => $model));
}