This repository has been archived by the owner on May 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from GianArb/86
Feature #86 add Composer tab
- Loading branch information
Showing
5 changed files
with
94 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace ZfModule\View\Helper; | ||
|
||
use Zend\View\Helper\AbstractHelper; | ||
use Zend\View\Model\ViewModel; | ||
|
||
class ComposerView extends AbstractHelper | ||
{ | ||
/** | ||
* $var string template used for view | ||
*/ | ||
protected $viewTemplate; | ||
|
||
/** | ||
* __invoke | ||
* | ||
* @access public | ||
* @return string | ||
*/ | ||
public function __invoke($composerConf) | ||
{ | ||
$vm = new ViewModel(array( | ||
'composerConf' => $composerConf, | ||
)); | ||
$vm->setTemplate('zf-module/helper/composer-view.phtml'); | ||
|
||
|
||
return $this->getView()->render($vm); | ||
} | ||
|
||
/** | ||
* @param string $viewTemplate | ||
* @return ZfcUserLoginWidget | ||
*/ | ||
public function setViewTemplate($viewTemplate) | ||
{ | ||
$this->viewTemplate = $viewTemplate; | ||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div class="well">php composer.phar require "<?php echo $this->composerConf['name']?>"</div> | ||
|
||
<h3>Require</h3> | ||
<ul> | ||
<?php foreach($this->composerConf['require'] as $requireName => $requireVersion){ | ||
echo "<li>{$requireName}: <span class='label label-success'>{$requireVersion}</span></li>"; | ||
}?> | ||
</ul> | ||
<?php if(!empty($this->composerConf['require-dev'])){?> | ||
<h3>Require Dev</h3> | ||
|
||
<ul> | ||
<?php foreach($this->composerConf['require-dev'] as $requireName => $requireVersion){ | ||
echo "<li>{$requireName}: <span class='label label-important'>{$requireVersion}</span></li>"; | ||
}?> | ||
</ul> | ||
<?php } ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters