本文整理汇总了PHP中Propal::initAsSpecimen方法的典型用法代码示例。如果您正苦于以下问题:PHP Propal::initAsSpecimen方法的具体用法?PHP Propal::initAsSpecimen怎么用?PHP Propal::initAsSpecimen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Propal
的用法示例。
在下文中一共展示了Propal::initAsSpecimen方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Propal
print $langs->trans($tmp);
} else {
print $tmp;
}
print '</td>' . "\n";
print '<td align="center">';
if ($conf->global->PROPALE_ADDON == "{$file}") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setmod&value=' . $file . '">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a>';
}
print '</td>';
$propal = new Propal($db);
$propal->initAsSpecimen();
// Info
$htmltooltip = '';
$htmltooltip .= '' . $langs->trans("Version") . ': <b>' . $module->getVersion() . '</b><br>';
$propal->type = 0;
$nextval = $module->getNextValue($mysoc, $propal);
if ("{$nextval}" != $langs->trans("NotAvailable")) {
$htmltooltip .= '' . $langs->trans("NextValue") . ': ';
if ($nextval) {
$htmltooltip .= $nextval . '<br>';
} else {
$htmltooltip .= $langs->trans($module->error) . '<br>';
}
}
print '<td align="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0);
示例2: testPropalBuild
/**
* testPropalBuild
*
* @return int
*/
public function testPropalBuild()
{
global $conf,$user,$langs,$db;
$conf=$this->savconf;
$user=$this->savuser;
$langs=$this->savlangs;
$db=$this->savdb;
$conf->propal->dir_output.='/temp';
$localobject=new Propal($this->savdb);
$localobject->initAsSpecimen();
// Einstein
$localobject->modelpdf='azur';
$result=propale_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
$this->assertLessThan($result, 0);
print __METHOD__." result=".$result."\n";
// Edison
$localobject->modelpdf='jaune';
$result=propale_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
$this->assertLessThan($result, 0);
print __METHOD__." result=".$result."\n";
return 0;
}
示例3: testPropalCreate
/**
* testPropalCreate
*
* @return void
*/
public function testPropalCreate()
{
global $conf,$user,$langs,$db;
$conf=$this->savconf;
$user=$this->savuser;
$langs=$this->savlangs;
$db=$this->savdb;
$localobject=new Propal($this->savdb);
$localobject->initAsSpecimen();
$result=$localobject->create($user);
$this->assertLessThan($result, 0);
print __METHOD__." result=".$result."\n";
return $result;
}
示例4: testPropalBuild
/**
* testPropalBuild
*
* @return int
*/
public function testPropalBuild()
{
global $conf, $user, $langs, $db;
$conf = $this->savconf;
$user = $this->savuser;
$langs = $this->savlangs;
$db = $this->savdb;
$conf->propal->dir_output .= '/temp';
$localobject = new Propal($this->savdb);
$localobject->initAsSpecimen();
// Azur
$localobject->modelpdf = 'azur';
$result = $localobject->generateDocument($localobject->modelpdf, $langs);
$this->assertLessThan($result, 0);
print __METHOD__ . " result=" . $result . "\n";
return 0;
}