PhpStorm - print out methods and variables in class files - phpstorm

I have about 10 classes all in individual files. I have not looked at them for ages. Is there a PhpStorm function that would allow me to list the methods and attributes listed in the individual files?
EDIT: The solution is to highlight all the classes you are interested in and then use the diagram tool. See my answer below.

You can use PHPStorm's Structure View:
Use the Structure pop-up window or the Structure tool window to quickly jump to the desired member of a file in the editor. The Structure views provide quick navigation for all supported file types.
You can also use the Structure tool window (Alt+7). This view is flexibly configurable and useful for many tasks, apart from navigation. However, the File Structure pop-up window is the easiest way for quick navigation.
Source https://www.jetbrains.com/phpstorm/help/navigating-with-structure-views.html

Finally discovered what I was looking for.
Highlight all the classes you are interested in in Project view. Right click Diagrams->Show Diagrams (or Ctrl+Alt+Shift+U).
Arrange diagrams on screen.
Select light colored background (Ctrl Backtick) select 5: Look and Feel (not theme).
Right click on diagram and do a print preview. Select Graph for full size. Click OK and make page adjustments. I printed out my 8 classes on an 11 x 17 sheet and I am in "help-my-bad-memory-heaven". Just what I was looking for.
Hope that was useful.

You can use a PHPDoc for that. Generate API doc of your comment doc and you have a offline reference very useful and like your code.
Otherwise, you can attribute a shortcut for launch or focus on the structure view PHPStorm tools.

Related

Is there a way to apply custom CSS before printing a page in a browser?

I occasionally save tutorials from a website as a PDF file for future reference.
My current manual workflow is:
Click the "show on one page" link to get a full single page view of the article.
Open the DevTools of the browser and select sections with advertisements and related links with help of the inspect-functionality and remove them.
Print the page as a PDF file.
I used the Firefox or Chrome-Browser for this, as they both have the required functionality and behave very similarly in that regard.
I noticed that the content I want to remove to get a "clean print" of the content is mostly the same: Let's say all adds are embedded with a div with the class add-banner.
Is there a way to automate these steps?
One idea is to load a custom CSS file that I would need to prepare specifically for a site. Simple rules like .add-banner { display: none; } would allow me to hide the sections that I don't want to print.
I also took a look at console based scrapers because I like the idea to call a command with the URL as a parameter. But the tools I've discovered are image based and I want a indexable PDF file where I can search for text and select parts.
What is the best option to achieve this?
The extension User CSS from the chrome web store (free) allows me to add custom css rules to whatever page is loaded. It is possible to import and export CSS rules and the extension allows to store the custom CSS on a per site base.
This is exactly what I was looking for, since it makes it easier and quicker for me to remove unwanted sections before printing.

Format list view and link to OOTB Preview functionality?

I have a document library and i have formatted the list view. This works great, however, we lose the OOTB functionality of SharePoint online where you can "preview" the file. This is where it opens in the main window and you can see the file but you also have all the SPO functionality, Share, Move, Copy, information window, version history etc.
How do i edit my Json to link to the OOTB preview? Does anyone have examples of this?
I was looking at it, but it seems that it is not possible to get items url nor parent folder's url using column formatting. I have found somehting at GitHub that mentioned .spItemUrl, but I wasn't able to use it.
The only way, is to create Field Customizer using Javascript, which will give you much broader options. Unfortunately it is not that easy to build as creating column formatting using JSON.
Reference:
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-field-customizer

Extract only used css classes from css file

I'm working on an upgrade for our current application (asp.net mvc). Here my problem is, I have a existing css file name "styles.css". Now this file has lots of css classes and they are used in different pages.
Now as a part of the upgrade process, this css file will not be used anymore. But I still want certain css classes from this file, so that I can copy them to a new file and include it in my pages.
Any ideas on how to extract these styles which are used in my new pages. And yes the styles which I want to pick are already set to the controls in the page. Please help.
Finding ones that are used in single page should be easy with multiple tools. One good tool is called UnCSS.
The trick is checking an entire site where CSS file is shared accross pages.
This approach was popular in social networks recently with some high profile guys sharing it like Google's Addy Osmani and some Google Chrome guys:
http://addyosmani.com/blog/removing-unused-css/
Use Chrometools Audits
In Chrome Press: F12 -> Audits -> Run
It will let you know what is and is not used.
There are a lot of ways, for example:
Firefox plugin, this will extract the used css
https://addons.mozilla.org/en-US/firefox/addon/dust-me-selectors/
for chrome
https://chrome.google.com/webstore/detail/css-remove-and-combine/cdfmaaeapjmacolkojefhfollmphonoh?hl=en-GB
Manually: another way in the chrome (or other browsers), right click and select inspect element, this will show you the hierarchis which is working on specific element, by that you can take your used css
You can find the unsed css from the following tool, so that you can clean your css to have pure one
http://unused-css.com/
or
http://www.pontikis.net/blog/remove-unused-css
Use a Browser Debugger, click on the elements on site and see on the right corner which classes are machtes and copy them.

Two menu widgets in Asidefirst zone in Orchard CMS

According to design specification I have to add two different menu lists with own Titles on AsideFirst zone in Orchard CMS.
As far as I'm concerned there is no need to create your own zones, it could be done via your own Content Definition and creating your own View for Menu widget. It that correct, can you please share some info about it?
BTW: How do I add my custom View for replacing some widgets? Should I simply add .cshtml file with proper naming?
Download the shape tracing tool, found here: gallery.orchardproject.net/List/Modules/… and use it to inspect your menus to find the correct names for alternate shapes to use. These will be created in your enabled theme.
I believe you can copy the view generated by Shape Tracing into one of your modules and place it in the Views folder, not Views/Parts/.

How to add Navlinks (or article path) in Mediawiki?

I have installed mediawiki 1.21. I am wondering how you can add navlinks (meaning the path to the page. Not sure if I am using the right work to describe it) at the top similar to the way it is in wikihow website? Below is an image so you know what I am referring to.. I find this to be very useful so users can understand where they are when reading an article.
I have created a custom skin and I have a Navlink DIV at the top where I would to show the path to that page there like: wiki -> xyz Category -> Article Name. I have semantic extension installed. Can this be achieved with that? Or is there another way to do it? How can I add the code directly in my skin.php file so this navlink is generated and listed depending on what page the user is on?
Terminology
This kind of feature is called a breadcrumb.
Has MediaWiki already this kind of feature?
Yes, for subpages.
A subpage is a page intitulated Quux/Foo/Bar in a namespace with the subpage feature enabled. By default, this is the User namespace for example, but not the main one (For example, on Wikipedia projects, we want to be able to use titles like AC/DC).
In this situation, a breadcrumb Quux > Foo will be printed.
This doesn't solve your issue, as you want to use categories, but it allows you if you write your custom code to know there already is some code somewhere doing that :)
Breadcrumbs extensions
Some extensions have been developed to solve this particular issue:
BreadCrumbs2
CategoryBreadcrumb
The first is more exhaustive and gives you more flexibility, the second simpler and so a good starting point to write a custom stuff.