//访问的控制器方法
public function actionPedigree($id)
{
$pedigree = Pedigree::model()->findAllByAttributes(array('user_id'=>$id));
$this->widget('ext.pedigree.PedigreeWidget',array(
//族谱的数据
'pedigreeData'=>$pedigree,
//进行正方形的属性设置
'squareOptions'=>array(
'class'=>'vertical'
),
'isAjax'=>true,
'id' => $id,
));
}
class PedigreeWidget extends CWidget{
public function init(){
if(empty($this->pedigreeData)) return false;
//
if(!$this->isAjax)
{ //注册JS,CSS文件
$this->registerClientResource();
}
echo '<div class="pedigree_all">';
$this->analysisData();
echo '</div>';
}
}
2012/09/07 07:58:08 [error] [php] copy(D:\www\weishiji\assets\4271125d\css\bootstrap-yii.css): failed to open stream: Invalid argument (D:\www\weishiji\framework\utils\CFileHelper.php:130)
Stack trace:
#0 D:\www\weishiji\framework\utils\CFileHelper.php(59): copyDirectoryRecursive()
#1 D:\www\weishiji\framework\web\CAssetManager.php(233): copyDirectory()
#2 D:\www\weishiji\protected\extensions\bootstrap\components\Bootstrap.php(328): CAssetManager->publish()
#3 D:\www\weishiji\protected\extensions\bootstrap\components\Bootstrap.php(103): Bootstrap->getAssetsUrl()
#4 D:\www\weishiji\protected\extensions\bootstrap\components\Bootstrap.php(84): Bootstrap->registerCoreCss()
#5 D:\www\weishiji\framework\base\CModule.php(388): Bootstrap->init()
#6 D:\www\weishiji\framework\base\CModule.php(493): CWebApplication->getComponent()
#7 D:\www\weishiji\framework\base\CApplication.php(146): CWebApplication->preloadComponents()
#8 D:\www\weishiji\framework\YiiBase.php(127): CWebApplication->__construct()
#9 D:\www\weishiji\framework\YiiBase.php(100): createApplication()
#10 D:\www\weishiji\index.php(13): createWebApplication()
REQUEST_URI=/weishiji/index.php?r=site/pedigree&id=5
in D:\www\weishiji\protected\extensions\bootstrap\components\Bootstrap.php (328)
in D:\www\weishiji\protected\extensions\bootstrap\components\Bootstrap.php (103)
in D:\www\weishiji\protected\extensions\bootstrap\components\Bootstrap.php (84)